RE: [PHP] PHP 5, Windows, and MySQL
I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: 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 Content-type: text/html X-Powered-By: PHP/5.0.0 php running Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\CAFGPHP\test.php on line 4 PHP 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 Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 7:43 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Well, I don't know what you mean by a known issue. All your message says is that PHP 5 does not support MySQL. Yes, it does. It has no problem. I have installed it and used it a million times. So, you are doing something wrong. Did you test PHP 5 by itself, to make sure that it works without accessing MySQL? Did you test MySQL by itself, to be sure the server is running correctly when it is accessed outside of PHP 5. Did you install MysQL using its installer? That's the best way. What version of MySQL? What Windows? Did you turn cgi.force_redirect off in the php.ini file? You have to do that if you are using IIS. What error do you get? Janet Beauford wrote: From what I have been reading this is a known issue with PHP5. There is something in the php_mysql.dll which is not compatible. I wasted 3 hours today trying all the tips and tricks I could find, but the bottom line is that it won't work. This was my reason for posting to this group to see if anyone has any ideas. Here is one of the many links I was looking at to try and solve this. http://codewalkers.com/forum/index.php?action=displaythreadforum=php elpid =370realm=default Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 4:08 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Activating MySQL in PHP 5 is pretty simple. Open the php.ini file and uncomment the line for the extension that you want to use--php_mysql.dll or php_mysqli.dll. Restart the web server. Using the mysql functions is described in the php documentation. http://us3.php.net/manual/en/ref.mysql.php or http://us3.php.net/manual/en/ref.mysqli.php Janet Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- Janet Valade
Re: [PHP] PHP 5, Windows, and MySQL
Beauford wrote: I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: 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 It's not that the file can't be found, it's something inside the file breaking. Otherwise it would just say unable to find php_mysql.dll. I'd say it's finding the mysql4 version of the dll and trying to include it which ain't going to work if you want to talk to a mysql5 server. http://bugs.php.net/bug.php?id=24621 -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
Chris wrote: Beauford wrote: I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: 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 It's not that the file can't be found, it's something inside the file breaking. Otherwise it would just say unable to find php_mysql.dll. I'd say it's finding the mysql4 version of the dll and trying to include it which ain't going to work if you want to talk to a mysql5 server. http://bugs.php.net/bug.php?id=24621 There is a nice tool called dependencywalker which can help you resolve problems with loading dlls http://www.dependencywalker.com Cheers -- David Robley It's okay to be ugly...but aren't you overdoing it? Today is Prickle-Prickle, the 33rd day of Confusion in the YOLD 3172. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
On Mon, 2006-06-26 at 13:50, Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 The fact that you get an invalid resource error from a mysql_xxx() function indicates that you do indeed have a working MySQL lib. Looking at the error further indicates that you are not passing a valid mysql result handle to the function. Please show us the rest of the code where you perform the query and attempt to retrieve the result. Since I see no errors about connecting to the MySQL database, I assume that you have that part working. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
I use apache2triad (http://apache2triad.net/) which is an AMP package with PHP 5. I vaguely remember the first time I installed it (on Win XP Pro though) I got similar problems with MySQL. I uninstalled it and reinstalled as I wasn't sure if I accidentally clicked a dialog box without reading what it said then it worked ok. HTH... PS - I had GD working ok on a simple thumbnail generation script. On 26/06/06, Beauford [EMAIL PROTECTED] wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Chubb [EMAIL PROTECTED] 07915 053312
RE: [PHP] PHP 5, Windows, and MySQL
From what I have been reading this is a known issue with PHP5. There is something in the php_mysql.dll which is not compatible. I wasted 3 hours today trying all the tips and tricks I could find, but the bottom line is that it won't work. This was my reason for posting to this group to see if anyone has any ideas. Here is one of the many links I was looking at to try and solve this. http://codewalkers.com/forum/index.php?action=displaythreadforum=phphelpid =370realm=default Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 4:08 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Activating MySQL in PHP 5 is pretty simple. Open the php.ini file and uncomment the line for the extension that you want to use--php_mysql.dll or php_mysqli.dll. Restart the web server. Using the mysql functions is described in the php documentation. http://us3.php.net/manual/en/ref.mysql.php or http://us3.php.net/manual/en/ref.mysqli.php Janet Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- Janet Valade -- janet.valade.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php