scrubbicus Posted March 6, 2009 Share Posted March 6, 2009 So I'm starting to learn MySQL and I've got a server set up on my computer and am trying to configure it all so I can run my scripts on my computer instead of having to upload them on my host and testing them. I have Apache, PHP, and MySQL installed on my Media Drive in a folder named www (this is the not the same drive as my Windows folder if that matters, I've read some about how certain DLLs need to be in the Windows folder, instead I set a environmental path to them). I'm reading a tutorial and I've done a few things with MySQL like create a datebase and table and it's giving me a script like this: // attempt database connection $mysqli = new mysqli("localhost", "user", "pass", "music"); if ($mysqli === false) { die("ERROR: Could not connect. " . mysqli_connect_error()); } What's MySQLi? Is this another extension or another way of communicating to MySQL? I tried to run this script and I got Fatal error: Class 'mysqli' not found in C:\www\server\sessions\mysql.php on line 3 I've edited my php.ini document and removed the colons from the MySQLi and MySQL extentions and set paths to my c:\www\php folder and c:\www\php\ext folder what else might I need to do? Any help is appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/148188-first-time-with-mysql/ Share on other sites More sharing options...
vicodin Posted March 6, 2009 Share Posted March 6, 2009 step1. you can find php_mysqli.dll step2. and put that dll into c:\php\extensions\ step3. that folder is not available, create it. now our dll file is in c:\php\extensions\php_mysqli.dll step4. go to php.ini, i thought that is in c:\windows step5. search "extension_dir" step6. after you found that you can set the path c:\php\extensions step7. inside the php.ini, go to the dll section (search dll as your text in the search box) step8. there is something like ;extension=php_mysqli.dll step9. if it is not available, you type the above thing and remove the semicolan ( step10. save php.ini file and check it out. Link to comment https://forums.phpfreaks.com/topic/148188-first-time-with-mysql/#findComment-777860 Share on other sites More sharing options...
scrubbicus Posted March 6, 2009 Author Share Posted March 6, 2009 I did all that, still getting. Fatal error: Class 'mysql' not found in C:\www\server\sessions\mysql.php on line 3 $mysqli = new mysqli("localhost", "I GOT MY COMPUTER NAME HERE", "MYSQL PASSWORD HERE", "music"); Link to comment https://forums.phpfreaks.com/topic/148188-first-time-with-mysql/#findComment-777886 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.