Portal Home > Knowledgebase > Articles Database > PHP


PHP




Posted by ConnorStr, 05-15-2009, 01:14 AM
I am trying to create a server running iis, php and mysql. I am having issues getting php and mysql to link up, I was searching around and found that PHP is not reading its config file (php.ini) from the location (C:\PHP\) instead its trying to read it from C:\WINDOWS\ and even if there is a php.ini in the Windows dir it does not link with the extensions. I am running PHP Version 5.2.9-2 and MySQL version mysql-5.0.81. Any ideas?

Posted by Blesta-Paul, 05-15-2009, 01:25 AM
Are you sure PHP is looking for php.ini in the wrong place? If it's just a matter of PHP being unable to communicate with your MySQL server, it could be that the MySQL extension in PHP is not enabled. I think it is not enabled by default on Windows, though I could be wrong. Look in your php.ini for php_mysql.dll, is this line commented out?

Posted by ConnorStr, 05-15-2009, 01:38 AM
no, I had to uncomment it and via the phpinfo() it shows Configuration File (php.ini) Path: C:\WINDOWS Loaded Configuration File: (none)

Posted by mugo, 05-15-2009, 01:43 AM
Did you setup your ASAPI settings and point php to the php.ini? It doesn't really matter where it's physically located as long as you point IIS to it.

Posted by ConnorStr, 05-15-2009, 01:47 AM
Do you mean ISAPI?

Posted by mugo, 05-15-2009, 02:16 AM
Oops, yeah, just caught that. I should proof read. Here's a pretty good step by step I found http://www.visualwin.com/PHP-ISAPI/

Posted by 10gbus, 05-15-2009, 08:04 AM
Why dont you try wamp ?

Posted by ConnorStr, 05-15-2009, 11:32 PM
Ive used wamp before and didn't like it, something didn't work right plus I don't like apache on windows machines.

Posted by ConnorStr, 05-15-2009, 11:34 PM
In that "tutorial" you included it shows them using "Web Service Extensions" which I do not have in my iis window, I should clarify that this is on an XP Pro machine as a development machine.

Posted by ConnorStr, 05-16-2009, 12:09 AM
I have since completely set my iis back to its default settings and then re-attempted the php modifications, now it reads the php.ini but still won't enable the mysql extension even though that line is un-commented in said php.ini file.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
oc12host.com ? (Views: 461)
Time Zone issue. (Views: 457)
ip ping Need Help (Views: 472)