Click to See Complete Forum and Search --> : PHP5 stops working when turning mySQL extension on


jjc
01-14-2005, 01:53 PM
I installed PHP5 on IIS6 on server 1. Works fine.
I have MySQL installed on server 2.

Now I turn on the extension for MySQL in PHP.ini and have the correct dll's sitting where they belong. But.....

When I execute PHPINFO() everything hangs. I have set the following PHP.ini settings

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host = tps-liv-sv1 ; server 2 normally this says LOCALHOST
mysql.default_user = root
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off

Help is much appreciated. (MySQL 4.1.8)
James

planetsim
01-14-2005, 09:06 PM
Did you restart the server?
DId you get an error message?

jjc
01-17-2005, 12:00 PM
I restarted the server, I even rebooted (although that should make a difference). It just hangs and never returns. No messages at all, that's what is so confusing.

Thanks,
James

jerdo
01-17-2005, 10:40 PM
How did you install php, installer or zip file? Also, since you are using MySQL 4.1.8 you will need to change settings for mysqli not mysql.

jerdo
01-17-2005, 10:40 PM
How did you install php, installer or zip file? Also, since you are using MySQL 4.1.8 you will need to change settings for mysqli not mysql.

jjc
01-18-2005, 02:31 PM
Jerdo,
I will try MySQLi, but I was under the impression that you only need to use mySQLi if one uses transaction based -processes, which I didn't select when I installed mySQL.

But I will try.
Thanks,
James

jerdo
01-18-2005, 07:55 PM
I don't use transactions, yet when I upgraded from MySQL 4.0.xx to 4.1.7 (and subsequently 4.1.8) all my db related scripts died. So I had to change from using mysql_ commands to mysqli_ commands. Hopefully this helps some, if not keep posting and someone here is bound to have the solution.

jjc
01-18-2005, 08:27 PM
Jerdo,
I will certainly keep the tip in mind. But using the mysqli extension didn't change anything. Still it hangs.

I think I may have to install mysql on my PHP server as well to fix that, and then access the server on the other machine as my default database....

perhaps that will work.

PS. I used the PHP supplied MSI to install, which didn't work, after which I installed as ISAPI by hand, using the IIS instructions and tips ont he PHP website. that worked :-( but obviously not good enough....

Thanks,
James

the_php_guy
01-19-2005, 10:59 AM
if you use the php5 isapi version
you may want to check if these DLLs are copied to your windows directory correctly

php5-source\lib*.dll

because when it's working in isapi mode the working directory for php5isapi.dll is your windows system32 directory but not the php directory.

jjc
01-19-2005, 03:10 PM
I appreciate all the help I'm getting.

Unfortunately this didn't fix it either.

James

tsinka
01-20-2005, 03:09 AM
Hi,

what happens if you try to execute the php.exe from a dos shell ?

EDIT: In most cases when IIS hangs it to do with problems loading an extension. If the response times are very slow then setting output_buffering to On or e.g. 4096 can help a lot.

Where exactly did you copy the dlls (and which dlls) ? Do you have a php_mysql.dll (or php_mysqli.dll) in phpdir\ext ?

Thomas

jjc
01-20-2005, 01:04 PM
Thomas,
Nothing happens when I start from a dos shell.
It just hangs.

It is indeed the extension, and I believe it is caused by MySQL not being install on the same machine that PHP is installed on.

The extension libs (both PHP_MySQL.dll & PHP_MySQLi.DLL) are in the PHP root directory (/PHP or ./) and the EXT (/php/ext) directory as it was set-up by the PHP installer (.msi).

All LIB*.DLL files are both in the system32 and the PHP root directory.

I tried running another script that had no MySQL in it nor phpinfo() and it still hangs showing that it can't open the extension. Regular html still works. (*.html files)

James

tsinka
01-20-2005, 01:13 PM
Ok,

did you adjust the extension_dir configuration variable in php.ini (c:\windows\php.ini) ?

Thomas

jjc
01-20-2005, 01:25 PM
Yes, of course :-)

tsinka
01-22-2005, 04:42 AM
Do you still have that problems ?
Check the event log for any PHP related IIS error messages. Additionally, post the php.ini file.

Alternatively, download and install the zip package from php.net and check if that changes anything.

How does the IIS PHP configuration look like ?

EDIT: Which PHP 5 version did you install ?

Thomas

tsinka
01-23-2005, 05:42 AM
There's a sticky thread (http://www.phpbuilder.com/board/showthread.php?s=&threadid=10246585) that might be helpful.

Thomas

jmorin
01-23-2005, 05:57 AM
I am also having the exact same problem. Every forum that I have been to has yet to come up with a solution to this problem. So if someone has come up with the answer, please I'm dying to know how to fix it.

tsinka
01-23-2005, 06:09 AM
Did you copy php.ini to the c:\windows directory and adjust the extension_dir variable in php.ini to the php\ext directory ?

EDIT: Also make sure that the IUSR_???? user has access to the PHP directory and its subdirectories.

Thomas

tsinka
01-23-2005, 06:15 AM
The following site might be helpfull, too:

http://www.peterguy.com/php/install_IIS6.txt

jmorin
01-23-2005, 06:19 AM
awesome, great advice. It worked. Thanks alot.