Database connection issues - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Database connection issues (/showthread.php?tid=73355) |
Database connection issues - Mekaboo - 04-14-2019 Hey eveyone! Im having issues connecting CI to database. I have a feeling some of it is due to my wbehost but was wondering if some of it was due to configuration mistake on my end. Ive attached a screenshot but if that doesnt open here it is: A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (28000/1045): Access denied for user 'cpses_cuzpghfnyu'@localhost (using password: YES) Filename: mysqli/mysqli_driver.php Line Number: 203 Backtrace: File: /home4/cultured/public_html/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 /home4/cultured/public_html/system/core/Exceptions.php:271) Filename: core/Common.php Line Number: 564 Backtrace: File: /home4/cultured/public_html/index.php Line: 315 Function: require_once A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: core/CodeIgniter.php Line Number: 518 Thank you for any help given! , Mekaboo RE: Database connection issues - php_rocs - 04-14-2019 @Mekaboo, You need to check some things. Make sure that your php settings have MySQL extension turned on. Also, you should talk with your host company to make sure that you have the correct DB settings. RE: Database connection issues - php_rocs - 04-14-2019 @Mekaboo, Also, what version of CI are you using? PHP version? RE: Database connection issues - Mekaboo - 04-14-2019 (04-14-2019, 05:41 PM)php_rocs Wrote: @Mekaboo, Thank ya so much for the advice Im using the current version of CI and web host uses version 5.4 RE: Database connection issues - Mekaboo - 04-14-2019 After speaking with my webhost I realized I a few mistakes with the credentials in my database.php file. Got them fixed!! RE: Database connection issues - php_rocs - 04-15-2019 @Mekaboo, Glad I could help. One other recommendation. I'm surprised that your hosting company is still using PHP 5.4. PHP 5.4.x is EOL ( https://www.php.net/eol.php ) They should at least be 7.1.x. RE: Database connection issues - dave friend - 04-15-2019 (04-15-2019, 09:00 AM)php_rocs Wrote: @Mekaboo, And 7.1 will reach End of Life on 1 December 2019. RE: Database connection issues - Mekaboo - 04-18-2019 (04-15-2019, 09:00 AM)php_rocs Wrote: @Mekaboo, Im actually building a site for a client and the webhost they chose hasn't updated their php I guess. The webhost I use personally recently sent me an email to update my php so I will be doing that ASAP!!! RE: Database connection issues - Mekaboo - 04-18-2019 (04-15-2019, 01:30 PM)dave friend Wrote:(04-15-2019, 09:00 AM)php_rocs Wrote: @Mekaboo, I have a feeling when the webhost inform my client of the change they will inform me. The webhost I use for myself has already informed me of the update so I will be doing that soon!! |