![]() |
How to setup mysql database in wamp with codeigniter? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to setup mysql database in wamp with codeigniter? (/showthread.php?tid=19921) Pages:
1
2
|
How to setup mysql database in wamp with codeigniter? - El Forum - 06-22-2009 [eluser]neodregan[/eluser] I'm following the tutorial on devshed, but when I go to "http://localhost/ci/index.php/helloworld/". I get the error, " A Database Error Occurred Unable to connect to your database server using the provided settings. ". These are the settings that I have in databases.php: $db['default']['hostname'] = "localhost"; $db['default']['username'] = "root"; $db['default']['password'] = "root"; $db['default']['database'] = "mydatabase"; $db['default']['dbdriver'] = "mysql"; $db['default']['dbprefix'] = ""; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ""; $db['default']['char_set'] = "utf8"; $db['default']['dbcollat'] = "utf8_general_ci"; I went to phpMyAdmin in wamp and added the mydatabase mysql database and tried to add a password, but after that happened. It said a password was not set for mydatabase. Can anyone tell me how to set this up in wamp correctly? How to setup mysql database in wamp with codeigniter? - El Forum - 06-22-2009 [eluser]Dam1an[/eluser] Try connecting without the password then There is no password by default with XAMPP either, and it works fine without it How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]neodregan[/eluser] Now I get this error: An Error Was Encountered Unable to load the requested file: helloworld.php How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]Thorpe Obazee[/eluser] You need to create the helloworld.php. Particularly, which devshed tutorial are you talking about? How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]neodregan[/eluser] I'm on this part. http://www.devshed.com/c/a/PHP/Introduction-to-the-CodeIgniter-PHP-Framework/3/ I put the helloworld.php under the controllers folder with this code. Code: <?php And under the views folder, I put this in the index.html file: Code: <html> Still no go. How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]Thorpe Obazee[/eluser] you'll need to have a helloworld.php file in the views folder. Copy that content in a helloworld.php file. How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]neodregan[/eluser] I did what you said, now I receive this! Fatal error: Cannot redeclare class HelloWorld in C:\wamp\www\ci\system\application\views\helloworld.php on line 25 How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]Thorpe Obazee[/eluser] [quote author="neodregan" date="1245758841"]I did what you said, now I receive this! Fatal error: Cannot redeclare class HelloWorld in C:\wamp\www\ci\system\application\views\helloworld.php on line 25[/quote] Code: <html> Copy only this How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]Dam1an[/eluser] I'm guessing you misunderstood what bargainph said, you should rename the view to helloword.php, not copy the helloworld.php controller Edit: Darn it, beat by Bargainph How to setup mysql database in wamp with codeigniter? - El Forum - 06-23-2009 [eluser]Thorpe Obazee[/eluser] [quote author="Dam1an" date="1245761647"]I'm guessing you misunderstood what bargainph said, you should rename the view to helloword.php, not copy the helloworld.php controller Edit: Darn it, beat by Bargainph[/quote] ![]() |