b0rg Posted September 10, 2009 Share Posted September 10, 2009 Hi. PHP does not appear to recognise my MySQL installation. I am experienced with computers, though very much a beginner with PHP and MySQL. I have been following a book, and the instruction has been working until this point. Any help would be much appreciated. Thanks in advance. I have the following configuration installed on an XP platform as a test bed: "Apache HTTP Server 2.2.13 including OpenSSL" "PHP 5.2.10" (zipped installation, not installer version). "MySQL Community Server 5.0 (x86)" PHP is installed in C:\php. Default locations for Apache and MySQL. I have taken the following steps as per an instruction I have been given: 1. Placed a copy of mysql.dll, and mysqli.dll from the ext sub directory, into c:\php. 2. Edited httpd.conf to include the directives: "LoadModule php5_module "C:/php/php5apache2.dll" and, "AddType application/x-httpd-php .php". 3. Placed a copy of php.ini-dist into the windows folder, and renamed to php.ini. Edited to remove semicolon in front of the following lines: extension=php_mysql.dll extension=php_mysqli.dll b0rg Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/ Share on other sites More sharing options...
artacus Posted September 10, 2009 Share Posted September 10, 2009 Did you restart apache after you made the changes? I recommend Windows users (especially those just getting started with it) use a bundle. Like http://www.apachefriends.org/en/xampp.html Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/#findComment-916145 Share on other sites More sharing options...
b0rg Posted September 10, 2009 Author Share Posted September 10, 2009 Thanks. I did indeed. Thought someone might ask me that, and I'd realised I'd left that off the original message. Perhaps I haven't provided enough information? I did some research of course (here), and found one message that might have pertained, but that didn't work either. Search swamps you with hits when you only have a few key words you can use Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/#findComment-916265 Share on other sites More sharing options...
b0rg Posted September 10, 2009 Author Share Posted September 10, 2009 I'm not 100% sure why this is now working but I can now see the MySQL section in phpinfo output. I had changed the php.ini line "extension_dir = "C:/php/ext" to be enabled also, so perhaps that was the issue. Thanks for the help. XAMPP looks like a really good idea by the way, so thanks for that info also. I'm not sure how to set this thread to solved, or even if I can, but the issue is definitely now SOLVED! Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/#findComment-916306 Share on other sites More sharing options...
artacus Posted September 10, 2009 Share Posted September 10, 2009 Make a page that says <?php phpinfo(); ?> And tell us what it says in the mysql section. Oh, and for as long as it takes you to do that, you could have downloaded XAMPP Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/#findComment-916309 Share on other sites More sharing options...
b0rg Posted September 10, 2009 Author Share Posted September 10, 2009 Yeah yeah... I like to do things the hard way so I learn ok There was no MySQL section before it started working. Everything else in the output looked good though. Must have been a slight misconfiguration. Might still have a look at XAMPP though, so thanks for the tip. Quote Link to comment https://forums.phpfreaks.com/topic/173740-mysql-not-loading-in-php/#findComment-916325 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.