![]() |
Database error in localhost - 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 error in localhost (/showthread.php?tid=72862) |
Database error in localhost - scatman98 - 02-20-2019 i downloaded the website from server to localhost and getting the following error PHP Code: A Database Error Occurred This is whats contained in the Home.php file PHP Code: * http://example.com/index.php/welcome How do i resolve this? RE: Database error in localhost - php_rocs - 02-20-2019 @scatman98, Which one is line 24 (VRClient or form_validation)? I'm surprised that you didn't do this instead: $this->load->library(array('user_agent','paypal_lib','VRClient','form_validation')) or $this->load->library(['user_agent','paypal_lib','VRClient','form_validation']) Are Ad_model and Ad_user two different models or are you using Ad_user as the object name same for User_model? RE: Database error in localhost - ciadmin - 02-21-2019 I am guessing that your line 24 is the first time you try to load a model ('Ad_model). The error message indicates that your database settings are incorrect. Those are in application/config/database.php, or possibly an environment-specific folder inside that. RE: Database error in localhost - scatman98 - 02-21-2019 (02-20-2019, 09:01 PM)php_rocs Wrote: @scatman98, 24th line is Code: parent::__construct(); okay thanks for telling me about this, im just getting started with programming. this is someone elses work which im trying to study. RE: Database error in localhost - scatman98 - 02-21-2019 (02-21-2019, 01:27 AM)ciadmin Wrote: I am guessing that your line 24 is the first time you try to load a model ('Ad_model). yes you are right. the username and password were not specified. |