PHP5.3 not working with MySQL5.1

Ok, first post on the forum. maybe you can help.

Basically MySQL is not working with PHP5.3 on windows7 with IIS7.

I have found that I might need to move a file, libmysql.dll, to system32… but php3 doesn’t come with it. Has anyone gotten PHP5.3 to work with MySQL5.1 on Windows?

Made a post on servervault about this and no luck there.

What PHP distributive you’ve got? Zip one or installer?

I have tried both. I’m now trying the zip again. Simply having trouble with the mysql. everything else work great!

I have even tryed moving 5.2 files and ext around in php5.3 but that has not worked.

could it be that im using 64bit mysql?

Define “not worked” first.

not worked: “adding libmysql.dll to php5.3 and system32 from php5.2”

installing mysql32bit now

Even adding not working? Windows denied file copy?

mysql32bit won’t help you with file copying…

files copied fine. That was more a shot in the dark - as i have tried all kinds of configurations with php5.3.

The moving of the file in php5.2 to 5.3 my reaction to frustration :smiley:

ook i reset mysql to 32bit and now i get

HTTP Error 500.0 - Internal Server Error
C:\php\php-cgi.exe - The FastCGI process exceeded configured activity timeout

im guessing it is not finding mysql when i try to install wordpress

“not finding” will produce trivial “could not connect” error
instead of “guessing” I’d suggest to take a look at web-server’s error log

When you going to enable MySQL in PHP, you don’t need sql server at all. At least you can connect to the external one.
When PHP starts with no errors and phpinfo() shows mysql support, only then you can switch to mysql setup. And starting wordpress is even more far away from this point.

did you uncomment
;extension=php_mysql.dll
in php.ini?

yes i have done all that. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH.

The above was taken from the php website. I’m running PHP5.3 and there is not find a file named libmysql.dll. I even tried the sitepoint tutorial on this topic. I may have to use php5.2

And there are no errors and phpinfo() shows mysql/mysqli are enabled. All that happens is my sever times out after 60 second like the ini tell it to.

libmysql.dll is no longer used in PHP 5.3, it recived a new native extension.
http://blog.felho.hu/what-is-new-in-php-53-part-3-mysqlnd.html

There is nothing to move or copy. http://us3.php.net/manual/en/mysqlnd.install.php

 [I]Installation on Windows[/I]   
     In the official PHP distributions from 5.3 onwards, MySQL Native     Driver is enabled by default, so no additional configuration is     required to use it. All MySQL database extensions will use MySQL     Native Driver in this case.

So then were might my problem be coming from? All i get is.

HTTP Error 500.0 - Internal Server Error
C:\php\php-cgi.exe - The FastCGI process exceeded configured activity timeout

When i add mysql_connect function to my code; is there a tutorial on how to get this working?

Do you have extension=php_mysqli.dll uncommeted in php.ini ?

I have them all uncommitted.

extension=php_bz2.dll
extension=php_curl.dll
extension=php_dba.dll
extension=php_exif.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_ming.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_phar.dll
extension=php_pspell.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
extension=php_sqlite3.dll
extension=php_sybase_ct.dll
extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll

i did it check it out http://inteldesigner.com/2010/code/having-problems-getting-php5-3-to-work-with-mysql5-1

So was it just a matter of using 127.0.0.1 (I have the t-shirt) instead of localhost?

If so, then a better fix might be to comment out the localhost line in the hosts file, so that IPV6 isn’t used instead.


#::1             localhost

That way you won’t have to make the change in all of your files that use localhost to connect.

The other benefit is that when MySQL version 6 comes out with IPV6 support, you can uncomment the line and have full IPV6 localhost capabilities once again.

Cool I will have to add that to my post

This gives me hope. Yesterday I upgraded to the latest version of PHP5.3 and immediately noticed a problem, and ended up downgrading back to my old 5.2 version. I will try this to see if it solves my problem.

The following guide about migrating from 5.2 to 5.3 may be of use as well, particularly the [url=“http://www.php.net/manual/en/migration53.incompatible.php”]backward incompatible changes section.