Click to See Complete Forum and Search --> : Can't connect to MySQL/Win2000/PHP4.0.6+


Anon
02-13-2002, 06:30 PM
I run apache 1.3.23 and MySQL 3.23.39 on a Windows 2000 server. I recently upgrade from php 4.0.5 to 4.1.1 and I can't connect to MySQL!! I can connect to mysql from DOS prompt (mysql.exe) and with administer programs for mysql...but not with PHP. I've checked all settings for apache and also php.ini...


----------
Warning: Can't connect to MySQL server on 'localhost' (10061)

Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10061)
----------

The strange thing is that when I install php 4.0.5 it works fine...but not with 4.1.1...I've also tried with 4.0.6, but it doesn't work either.

HELP!!!

Anon
02-13-2002, 08:33 PM
At first glance, I would adise you to check your php.ini files. Even if they look similar, thay aren't all the same ;-)

Anon
02-14-2002, 05:10 PM
First and foremost. Did you shut down your computer and restart? Second Did you do it manually? Like not with the installer program? I just set up 24 servers with PHP, MySQL,and of course APACHE! I went in manually and did it. Alain has a point with the php.ini file but I think you need to look for Extension_dir in the php.ini file and look to make sure you have it pointing to the right place. That would be your biggest problem. Then create the ever famous
<?php
phpinfo();
?>
file and see if that returns anything.. If you get a good feedback make sure your calling the right database. Save your C:\Mysql\data folder and then reinstall mysql if it all doesnt work. Back up everything in that folder. Then lastly check and make sure that at the bottom of your http.conf file in apache has this at the bottom below </virtualhost>

ScriptAlias /php4/ "C:/php4/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php4/php.exe"
AddType application/x-httpd-php .php3
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Man if that doesnt work then just turn it off, go get some Wendy's and a Twinkie and restart your computer. Repeat as necessary.

Hope I can help.
Chad

gardner1
02-15-2002, 02:22 PM
"Man if that doesnt work then just turn it off, go get some Wendy's and a Twinkie and restart your computer. Repeat as necessary."

lol, wouldn't that feed into a sugar and fat induced rage state?

his manager would walk in on the pieces of what used to be a server farm

=O

gardner1
02-15-2002, 02:26 PM
While it has nothing to do w/ PHP and MySQL, this error code is common and points to a 'named-pipe when opening connect() problem'

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q195566

might help to offer insight as to the source of the problem.

if the php ext's dir is not properly named or pointed to then the dll to open mysql might not be existing