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

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 “” 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 “       localhost” if it is commented out by default, as is the case with Windows 7. Another workaround is to use “” 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.


CRC32: A356949C

MD5: F16FF84C27CBB642B4ED1E25FE997F82

SHA1: DCCF68C0935ECE581D1F0208F6E8A27C265CBF03

Related Posts:

Next Post:
Previous Post:


  1. bigmudcake

    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.

  2. Anindya

    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.

  3. Even Husby

    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?


  4. Anindya

    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.

  5. Even Husby

    Thanks, I’ll give it a try.

  6. Matt Stanyer

    Is this the non thread safe version?

  7. Anindya

    No, this is the thread safe version. I did not compile the non thread safe version.

  8. Matt Stanyer

    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?

  9. Anindya

    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.

  10. Jonas


    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 but I guess it doesn’t matter as long as I have the php extension working.

  11. Hansi

    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 in hosts and the ipv6 reference was NOT mapped made it work. Thanks!

  12. Anindya


    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. 😀

  13. tidjidi

    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

  14. Joshua Hatfield

    Not sure if MediaFire is doing maintenance but I am unable to download file from this page:

    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?

  15. Anindya

    The mediafire link is working fine for me at the moment. But I created a mirror anyway.

  16. Dave Drury

    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

  17. Anindya

    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 .

  18. Dave Drury

    Thanks so much – much appreciated

  19. artViper

    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!

  20. Anindya

    You are welcome. 🙂

  21. Tigran

    Thanks a lot for compiling and publishing this package and for all the tips, posted here.
    It is very helpful and useful 🙂

  22. Anindya

    My pleasure. 😀

  23. nobita215

    please compile PHP 5.2.13 and PHP 5.3.2 non thread safe version. Please, urgently needed.

  24. Anindya

    Here is the non thread safe version of PHP 5.3.2 – . 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

  25. nobita215

    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

  26. nobita215

    Spend, but wincache does not support x64 php, is there any x64 wincache?

  27. nobita215

    i’am use intel xeon cpu,is not amd..

  28. deep_light77(Alberto)

    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:

  29. Anindya


    There is no harm in using 32 bit PHP with 64 bit iis.

  30. nobita215

    please compile PHP 5.2.13 non thread safe x64 version and wincache x64 version. Please, urgently needed

  31. Trevor


    Fantastic work, thank you very very much


    Those instructions in your zip file were excellent, thanks.

  32. Vince

    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.

  33. Mike

    Greta work, thank you, but maybe i´m blind… 🙂

    Can you tell me where is the php5isapi.dll ??

    • Anindya

      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. 🙂

  34. Jairo

    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.

  35. Aeris

    Thanks a lot for the compilation. This is really helpful and definitely for the others as well. Thank you again for sharing!

Leave a Comment