Click to See Complete Forum and Search --> : [RESOLVED] Installing Apache, PHP & MySQL
fean0r
04-23-2008, 09:23 AM
I am having a problem loading MySQL through PHP on my local server.
Windows XP SP2
Apache 2.2
MySQL Server 5.0.51a
PHP 5.2.5
I have the following in my php.ini
extension_dir ="C:\Web\PHP\ext\"
extension=libmySQL.dll
I copied the libmySQL.dll from the MySQL install into C:\Web\PHP\ext\".
The file structure is as follows.
C:\Web\PHP\
C:\Web\Apache2.2\
C:\Web\MySQL_Server_5.0\
The PHP and Apache loads fine and I can connect to the MySQL using the command line tool.
Any ideas why I cant get the MySQL loaded with PHP?
Thanks
I have attached the phpinfo(); below
NogDog
04-24-2008, 02:19 AM
Start with this forum FAQ: http://phpbuilder.com/board/showpost.php?p=10805646&postcount=3
fean0r
04-24-2008, 07:17 AM
Thanks I have already tried that.
fean0r
04-24-2008, 02:47 PM
I really cant find any answers to this issue :(
The weird thing is I do not get any loads errors, almost like its not even trying to run the .dll
bradgrafelman
04-24-2008, 03:21 PM
You should be using the libmysql.dll that comes with PHP. Since you're using PHP5, it should be in the main directory where you extracted PHP to (e.g. c:\Web\PHP\). This directory should then be added to your system's PATH environment variable so that PHP can find the .dll.
fean0r
04-25-2008, 07:12 AM
You should be using the libmysql.dll that comes with PHP
There was no libmysql.dll in the PHP install - I reinstalled to double check :(
bradgrafelman
04-25-2008, 01:46 PM
Did you download the zip package?
fean0r
04-25-2008, 02:25 PM
no just the .exe installer - should I try the .zip instead?
fean0r
04-25-2008, 03:00 PM
typical!
I downloaded the .zip and put the php_mysql.dll in my system32 then rebooted and it worked :)
Thanks Brad you got me on ther right track.
Thanks to everyone for your replies.
P.S. I will put this method on my site as a tutorial for installation on XP SP2, I will post a link later since I could not find decent install tutorial this may help others.
bradgrafelman
04-25-2008, 03:02 PM
and put the php_mysql.dll in my system32You should never move any PHP-related files outside the PHP installation directory (including any DLL files or the php.ini file)!
fean0r
04-25-2008, 03:17 PM
Well it did nt work until I did, Unless the new files needed a system reboot rather than just an apache reboot?
bradgrafelman
04-25-2008, 03:34 PM
php_*.dll should be in the extension_dir that is defined in your php.ini file. Support .dll libraries (e.g. libmysql.dll) should be placed in the main PHP installation folder which should be added to the system's PATH environment variable.
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.