database configuration not work |
i have tried many time my database does not connected THIS ERROR HAVE COME I ALSO MY DATABASE .PHP file also i add datebase.php file attache for you to check the problem also i add new in model/property.php file i also another method on controller/properties.php file on this file i add db_test method
and this is the link when i connect to the database http://localhost:8888/index.php/properties/db_test and last thing this command when i run in terminal env DB_USER=root DB_PASSWD=root DB_NAME=ci_course php -S localhost:8888 but not work please help to solve the issue A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2002): No such file or directory Filename: mysqli/mysqli_driver.php Line Number: 202 Backtrace: File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/application/models/Property.php Line: 17 Function: database File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/application/controllers/Properties.php Line: 29 Function: connection_test File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/index.php Line: 315 Function: require_once A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/system/core/Exceptions.php:272) Filename: core/Common.php Line Number: 573 Backtrace: File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/application/models/Property.php Line: 17 Function: database File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/application/controllers/Properties.php Line: 29 Function: connection_test File: /Applications/file/Ex_Files_CodeIgniter_Basics/Ch01/01_06_final/index.php Line: 315 Function: require_once A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: controllers/Properties.php Line Number: 29 |
Welcome Guest, Not a member yet? Register Sign In |