PHP 5.3.2 x64 (64 Bit) Windows Binary

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.
Download
CRC32: A356949C
MD5: F16FF84C27CBB642B4ED1E25FE997F82
SHA1: DCCF68C0935ECE581D1F0208F6E8A27C265CBF03
Related Posts:
Next Post: Apache HTTP Server 2.2.16 x86 and x64 Windows Installers
Previous Post: ModSecurity 2.5.12 x64 (64 Bit) Windows Binary

Mar 16, 2010 at 12:07 AM
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.
Thanks again.
Mar 16, 2010 at 3:50 AM
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.
Mar 22, 2010 at 4:30 AM
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?
Regards
Mar 22, 2010 at 8:30 AM
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.
Mar 22, 2010 at 11:55 AM
Thanks, I’ll give it a try.
Apr 12, 2010 at 5:46 PM
Is this the non thread safe version?
Apr 13, 2010 at 6:53 AM
No, this is the thread safe version. I did not compile the non thread safe version.
Apr 13, 2010 at 4:55 PM
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?
Apr 15, 2010 at 4:23 AM
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.
Apr 21, 2010 at 12:43 AM
Hi,
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.
Apr 21, 2010 at 4:13 AM
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!
Apr 21, 2010 at 4:26 AM
@Jonas
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.
@Hansi
I am glad you found my post helpful.
May 4, 2010 at 6:59 PM
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
May 10, 2010 at 1:30 PM
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?
May 10, 2010 at 3:24 PM
The mediafire link is working fine for me at the moment. But I created a mirror anyway.
http://drop.io/qfcnvbw/asset/php-5-3-2-win32-vc9-x64-zip
May 29, 2010 at 8:45 PM
Hi Anindya,
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
May 29, 2010 at 8:59 PM
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 .
May 29, 2010 at 9:40 PM
Thanks so much – much appreciated
Jun 10, 2010 at 8:33 PM
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!
Jun 10, 2010 at 8:35 PM
You are welcome.
Jun 20, 2010 at 12:13 PM
Thanks a lot for compiling and publishing this package and for all the tips, posted here.
It is very helpful and useful
Jun 22, 2010 at 12:55 PM
My pleasure.
Jun 23, 2010 at 11:09 AM
please compile PHP 5.2.13 and PHP 5.3.2 non thread safe version. Please, urgently needed.
Jun 23, 2010 at 6:04 PM
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.
Jun 23, 2010 at 7:35 PM
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
Jun 23, 2010 at 8:03 PM
Spend, but wincache does not support x64 php, is there any x64 wincache?
Jun 23, 2010 at 8:55 PM
i’am use intel xeon cpu,is not amd..
Jun 27, 2010 at 5:55 AM
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
Jun 28, 2010 at 12:54 PM
@nobita215
There is no harm in using 32 bit PHP with 64 bit iis.
Jun 28, 2010 at 3:07 PM
please compile PHP 5.2.13 non thread safe x64 version and wincache x64 version. Please, urgently needed
Jul 14, 2010 at 5:23 AM
@Anindya
Fantastic work, thank you very very much
@Alberto
Those instructions in your zip file were excellent, thanks.
Jul 22, 2010 at 10:34 PM
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.
Jul 28, 2010 at 12:40 PM
Greta work, thank you, but maybe i´m blind…
Can you tell me where is the php5isapi.dll ??
Jul 28, 2010 at 1:49 PM
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.
Nov 3, 2010 at 1:55 AM
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.
Dec 15, 2010 at 3:00 AM
Thanks a lot for the compilation. This is really helpful and definitely for the others as well. Thank you again for sharing!