PDA

View Full Version : PHP5 MySql 4.1 IIS 5.O configuration error.


tboss132
05-09-2005, 03:50 AM
Hi All,
Finally, I decided to go fully into PHP. I downloaded PHP 5 on the PHP site. I also downloaded MySQL 4.1. I'm running IIS on a WinXP professional (SP2) machine. I installed both according to instructions. Tested PHP, it worked fine. Tested MySQL through command prompt and it also worked fine. Now my problem came when trying to get PHP to use MySQL, I got this error
Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0
I googled and discovered this situation was common all over the internet. It looks like it's peculiar to PHP5. I tried all solutions I saw but none worked. I copied all the relevant dlls to C/winnt and C/winnt/system32 as well as uncommenting the path variable in PHP.ini Still, i can't get it to work. I don't know what to do next. Hope someone can help me.

Thanks y'all... CF ain't never failed me yet ... and yes, I've been away for a while. Hope to be around for some time now.

amir
05-09-2005, 08:19 AM
> I believe it is possible with this configuration:
>
> 1. php*ts.dll, php*apache*.dll, php.ini, *.dll in e.g. C:\PHP\
> 2. C:\PHP\ in PATH
> 3a. C:\PHP\ in PHPRC (for PHP 4)
> 3b. C:\PHP\ in Registry entry HKLM\Software\PHP\IniFilePath (for PHP 5)
>
> C:\PHP\ in PATH is necessary only for *.dll (such as libmysql.dll). You
> can have these also in other PATH directory (e.g. C:\Windows\System32).

I think this is the perfect solution!


> Trailing slashes are necessary in some cases (e.g. 3a).
>
>
> > C:\windows\system32\libmysql.dll (without this the mysql extension
doesn't load)
>
> It works for me perfectly with libmysql.dll in any PATH directory.


Regards,
Aamir.

tboss132
05-09-2005, 11:39 AM
Thanks a lot Amir. I don't quite understand what you suggested though.
1. php*ts.dll, php*apache*.dll, php.ini, *.dll in e.g. C:\PHP\
> 2. C:\PHP\ in PATH
> 3a. C:\PHP\ in PHPRC (for PHP 4)
> 3b. C:\PHP\ in Registry entry HKLM\Software\PHP\IniFilePath (for PHP 5)
>
> C:\PHP\ in PATH is necessary only for *.dll (such as libmysql.dll). You
> can have these also in other PATH directory (e.g. C:\Windows\System32).
1. Do you mean I should copy those dlls into C:\php?
2. I already put C:\php in path
3a. I'm using PHP 5
3b. I'll do that ASAP

Thanks once again.

tboss132
05-11-2005, 05:53 PM
I scrapped IIS and installed Apache. It's working great for me now. Thanks anyway.
Now to figure out how to keep running asp ...

Brandoe85
05-11-2005, 05:59 PM
I kinda had the same problem, I couldn't get php and mysql going with IIS, it was either one or the other, so now when i'm doing asp, I turn off apache, and turn on IIS, a hassle, but saves me time in the end, as I don't think I would've ever gotten php and mysql running on IIS :p

tboss132
05-11-2005, 06:08 PM
LOL Brandoe, seems my case was a little complex than yours. Initially, I installed apache side by side with IIS using WAMP from wampserver.com but then i discovered that the Apache service would not start even after I stopped the IIS Admin service and set it to disabled. I also tried XAMPP but the index page was always showing blank. In the end, i removed everything PHP, MYSQL, WAMP, XAMPP and all configurations I could find. I then used Add windows components in Control panel Add/remove programs to remove IIS completely. After which I installed WAMP. It ran beautifully after this. I didn't bother to reinstall IIS cos I don't want anything messing with my Apache there. I'll probably try it later.