Some of you requested that I compile 64 bit Windows binaries for PHP 5.3.2 since they are not officially available from the PHP website. And so, I did and you will find the download link at the end of this post. But first let me tell you about a bug in this release that may or may not affect you. 😀
I compiled PHP 5.3.1 a few weeks ago but noticed that scripts that used the mysql extensions were not working. I thought this was because of a problem with the mysql extensions in this particular build, since the scripts were working fine with a 64 bit build of PHP 5.3.0 that I downloaded from http://windows.php.net/qa/.
Yesterday, after I compiled PHP 5.3.2, I noticed the same problem. And after a lot of messing around I realized that the problem was because PHP was not resolving “localhost” to “127.0.0.1” and instead resolving to the IPv6 address “::1”. As mentioned before, this problem is not there in PHP 5.3.0, so I believe its a bug in PHP.
A good workaround for this problem is to comment out “::1 localhost” in your “hosts” file (C:\Windows\System32\drivers\etc\hosts) if it isn’t already, and uncomment “127.0.0.1 localhost” if it is commented out by default, as is the case with Windows 7. Another workaround is to use “127.0.0.1” in your PHP scripts instead of “localhost”.
Also, I tried compiling the mysql extensions with libmysql instead of mysqlnd to see if the problem persisted. I was able to compile the php_mysql extension successfully with libmysql (the php_mysqli and php_pdo_mysql extensions failed to compile with libmysql), and noticed that the problem wasn’t there. Scripts that used the php_mysql extension to connect to the mysql database with “localhost” defined as the database host, were working fine. So, I have included the php_mysql extension compiled with libmysql with this release.
So far, this “localhost” resolution bug is the only one that I have come across in this release.
Anyway, this release also includes the php5apache2_2.dll module for use with 64 bit versions of Apache 2.2.
And here is the configure log for anyone interested in it.
A big thankyou for compiling and making available for download the latest version of PHP x64 VC9 edition for Windows.
One issue I see is that the file libmysql.dll will need to be copied to a folder thats included in the “PATH” variable like \windows or \windows\system32 or the mysql extension will not load.
Are you able to supply the php_mysql.dll extension file that was compiled against mysqlnt as a seperate download here.
You’re welcome. 😀
And here is the php_mysql.dll extension compiled with mysqlnd. I have “C:\php” in the “PATH” variable so it wasn’t an issue for me.
Thank’s a lot for providing this version of PHP. A question: Do you have or can you point me to the related DLL-files for php_mssql?
Here, try this extension (php_dblib.dll). Its the same as the php_mssql.dll extension but compiled with the FreeTDS library instead of the one provided with Microsoft SQL Server.
Thanks, I’ll give it a try.
Is this the non thread safe version?
No, this is the thread safe version. I did not compile the non thread safe version.
is it possible to get a NTS version compiled? I am setting up our new win 2008R2 server for Joomla to be installed (production company web server) & I don’t have much experience with IIS, from what i have read the NTS version of php is more responsive (in fastCGI mode). I am a bit confused as to the best way to setup php in Win 2008R2 server as it is 64bit, can you recommend the best way to go about getting php up & running so that it is fast & reliable?
Sure I can compile the NTS version. But it really shouldn’t be used for production. I recommend that you use the official 32 bit PHP binaries for production. You can run it in fastcgi mode or use the php5isapi.dll. Here is a tutorial on how to use the 32 bit php5isapi.dll with 64 bit IIS.
Great work with compiling this stuff. You don’t happen to have a matching memcache.dll compiled and ready? Would be super. I used this version of memcached http://www.urielkatz.com/archive/detail/memcached-64-bit-windows/ but I guess it doesn’t matter as long as I have the php extension working.
I owe you a big case of your favorite beer/other preferred beverage. Spent hours trying to find why php would refuse to access the mysql database. Making sure localhost was mapped to 127.0.0.1 in hosts and the ipv6 reference was NOT mapped made it work. Thanks!
I don’t use memcache so I didn’t compile memcache.dll. But if the version from that site is working fine, I don’t see any reason to compile it again myself.
I am glad you found my post helpful. 😀
Huuuh! Great deal! Thank you very much…
I finally understand why my Wamp server does not work properly on my brand new windows 7 64 bits… I chased around for notice of incompatibility, but found nothing.
Your explanation on localhost stuff was a revelation for me!. I effectively have this Host mentionned everywhere in my PHP code.
I try a little ping localhost on a command line window, and eventually the bug comes from Microsoft Windows. I guess that mysqlnd driver relies on OS answer on gethostbyid question…
Anyway, your workaround works fine for me
Again all my thanks
Not sure if MediaFire is doing maintenance but I am unable to download file from this page: http://www.mediafire.com/?ocemhmj3ymm
If you have a mirror, I’d love to get it and start using! Great work on the Apache build as well. Have you thought about zipping all of these files as one?
The mediafire link is working fine for me at the moment. But I created a mirror anyway.
Yet another thank you for a job well done. But …. (there always has to be one doesn’t there!) is there any chance of compiling a version of php_apc? I can find various x86 versions on the ‘net but absolutly nothing for a 64 bit version.
Once again, thanks for all your effforts
I tried to compile APC but failed. Some incompatibilities in the code prevents a 64 bit version to be compiled successfully. But I was able to compile latest version of eAccelerator successfully. Here it is http://www.mediafire.com/file/jx1mjnfnmnv/eAccelerator.dll .
Thanks so much – much appreciated
Man, thanks a lot for that – I’ve been struggling for hours and already suspected myself to be a bit stupid. I’ve built many apache / php / mysql installations before, but had never thought of the hosts file. You saved my day. Thanks!
You are welcome. 🙂
Thanks a lot for compiling and publishing this package and for all the tips, posted here.
It is very helpful and useful 🙂
My pleasure. 😀
please compile PHP 5.2.13 and PHP 5.3.2 non thread safe version. Please, urgently needed.
Here is the non thread safe version of PHP 5.3.2 – http://www.mediafire.com/file/2vwuwzzzxmm/php-5.3.2-nts-Win32-VC9-x64.zip . Unfortunately, I do not have time to compile PHP 5.2.13 at the moment.
Why do you need them so urgently anyway? If you need them for production use, then I recommend that you use the official 32 bit binaries available at php.net.
Thank you very much, I need to nts is because my server is iis7.5 x64 + fastcgi + wincache + mysqlx64 + php 5.2.13 x86 why I have an urgent need, if you have time, hope you can build what x64 5.2.13 nts my site phpinfo http://www.kupai.me/1.php
Spend, but wincache does not support x64 php, is there any x64 wincache?
i’am use intel xeon cpu,is not amd..
I love you man!!! This is a great work, I took the liberty to compile all the installers in a single zip file with detailed instructions to get everything working: Apache, php, mysql and phpmyadmin, just so its easier for everyone out there. (feel free to post it around if you want) Heres is the link: http://www.megaupload.com/?d=HZBHU530
There is no harm in using 32 bit PHP with 64 bit iis.
please compile PHP 5.2.13 non thread safe x64 version and wincache x64 version. Please, urgently needed
Fantastic work, thank you very very much
Those instructions in your zip file were excellent, thanks.
Thanks a lot for your work.
Windows 2K8 R2 is only x64 and we need to have WAMP in Full x64.
It is incomprehensible that there are no official compilations.
Greta work, thank you, but maybe i´m blind… 🙂
Can you tell me where is the php5isapi.dll ??
What a coincidence. I was preparing to post PHP 5.3.3 binaries when I saw your comment. 😀
Anyway, the new PHP 5.3.3 binaries which I have now posted here include the php5isapi.dll. Last time (PHP 5.3.2) it failed to compile, so I disabled it. This time I made some modifications to the source code to get it to compile successfully. I have tested it myself and it seems to be working fine. 🙂
Hello sorry, I looking for php_bcompiler.dll and php_ffi.dll php 5.3 nts x86
but on Internet is nothing, if you should help me thanks, I’ll wait you answer.
Thanks a lot for the compilation. This is really helpful and definitely for the others as well. Thank you again for sharing!