PHP 5.3.5 was released a few weeks ago. On January 6, 2011 to be precise. This new release apparently resolves a critical issue which only affected 32 bit PHP processes. So, I used the provided test script to check my latest 64 bit PHP builds and found out that they aren’t affected.
I just read the release announcement yesterday when I had some free time and decided to compile PHP 5.3.5. And I think this is the only change in it as I don’t see a changelog in their announcement. So, I don’t really think there was any point of compiling 64 bit PHP 5.3.5 builds but I did anyway since some of you have been requesting it. π
Download
VC9 x64 Thread Safe
CRC32: EE0E8E0B
MD5: CEEB134CB98DEDBF283E2F1EB0523CA3
SHA1: 4D94CC68D4093F4A42D429D135AEDA946C4E2ABE
VC9 x64 Non Thread Safe
php-5.3.5-nts-Win32-VC9-x64.zip
CRC32: EF309EBC
MD5: 897A7D7328D64CE3539E975CE9385D9E
SHA1: B61B45D3DB035B442F33E2D3DEBD654E6FB9DBBE
Additional Extensions
The pecl archives below contain APC 3.1.6 (I made sure that experimental features weren’t enabled), http 1.0.7 and Memcache 2.2.6.
pecl-5.3.5-Win32-VC9-x64.zip (Thread Safe)
pecl-5.3.5-nts-Win32-VC9-x64.zip (Non Thread Safe)
eAccelerator 0.9.6.1 (Thread Safe)
Pieter du Plooy
Much obliged for the release of the 5.3.5 build. Now all I hope for is a release of a 64 bit Postgis, but thats for another forum. lol. Thanx again.
By the way you were wondering why some of us requeste a 5.3.5 build? I want all my playthings to be new. lol.
Tigran
Thank you very much for the compilation of this build!
Anindya Author
Youβre both welcome. π
Bruno
Hello,
do you know the reason there is no official x64 for windows version at php.net ?
If it is so simple to do it, why they didn’t ?
Nik
does this build compiled with mcrypt support?
no mcrypt ext in phpinfo
Anindya Author
@Bruno
The official excuse is that 64 bit PHP on Windows doesn’t provide any significant performance improvements over 32 bit PHP and since 64 bit Windows can run 32 bit PHP just fine, they don’t see the point of having 64 bit binaries. At least, that’s what I heard
Anyway, I think the real reason is that they don’t want to spend the time fixing the bugs that cause 64 bit PHP on Windows to not function the same way as 64 bit PHP on linux. If there is no official 64 bit PHP, then they don’t have to fix bugs like this one. Initially, they even claimed that this ‘localhost’ bug (which has now been fixed) wasn’t a bug. But it’s free software after all and the developers have every right to avoid spending time fixing bugs that they don’t think are important enough to be fixed. π
Anindya Author
@Nik
This build does have mcrypt and is working fine in my case. You need to enable it in php.ini. You may also need to add the PHP directory to your Windows’ PATH environment variable.
Mauricio
Anindya,
I really apreciate your work. I supose the biggest benefit having PHP 64 bits (on top of Apache 64 bits) would be to address more than 4GB RAM, am I right?
Can you please provide instructions whether to deploy thread-safe or non non-thread-safe binaries? I’m a bit confused to decide. I’m going to run Win7 (w/o IIS) + Apache64 + PHP64.
Thank you very much.
Anindya Author
I initally compiled 64 bit PHP (thread safe version) to use with 64 bit Apache. I didn’t think about benefits or anything. Later someone requested non thread safe version and so I started compiling that too. I have no idea if this build can address more than 4GB RAM.
Anyway, for use with Apache, I recommend the thread safe binary. It has the php5apache2_2.dll Apache module. The non thread safe binaries are usually used with IIS in FastCGI mode (it does not have the Apache module or the ISAPI module for IIS). You can’t use opcode caches like eAccelerator with the non thread safe version.
Laszlo
Anindya,
I really apreciate your work, many thanks for your x64 “support” π
May I ask you to build php_saprfc extension? I can provide you the neccessary SAP RFC SDK for that.
Thanks,
Laszlo
Drew Green
Dude, you rock! Thanks!
Laszlo
Hi Anindya,
I just tried to compile PHP from sratch using http://wiki.php.net/internals/windows/stepbystepbuild
However I got this error below at PECL extensions. What’s the trick to pass it?
Creating phar.phar.bat
cd x64\Release\php-5.3.5
zip.exe -9 -q -r ..\php-5.3.5-nts-Win32-VC9-x64.zip .
cd ..\..
cd x64\Release\pecl-5.3.5
NMAKE : fatal error U1077: ‘cd’ : return code ‘0x1’
Stop.
Thanks,
Laszlo
Anindya Author
That’s just the part where it zips up the compiled binaries. If you just want the extension, you should be able to locate it in the x64\Release folder. But if for some reason you want those nicely zipped up pecl and php archives, you can edit the Makefile and replace the “cd ..\..” with “cd ..\..\..” (in the “build-dist” section). π
The configure command doesn’t generate the Makefile correctly.
Jesper
Hello Anindya
I am a great fan of your work and use your binarys a lot. Thank you very much for all the work you are doing helping non-compilers phpcoder with this. I would like to be able to use the lib_pdf.dll from pdflib.com and have asked if they could compile this for all us x64 users.
They replied with this…
******
When you build the DSO with our PECL extension, you have to link against the 64-bit C library, which is available for download on our website.
******
Unfortunately – that is no help to me, but i wonder if this is something you understand – and i also wonder if you could be so kind as to in that case compile and upload this extension ?
Thank you in advance
Jesper
Anindya Author
I had some free time when I saw your comment and so I went ahead and compiled the pdflib extension. Had to download and install the 64 bit windows binaries (PDFlib-8.0.2p3-MSWin64.msi) from pdflib.com, which contains the necessary headers and libraries to compile the extension.
You will find two files in the following archive, pdflib.dll and php_pdflib.dll. You need to put the pdflib.dll in your PHP root directory (eg. C:\php) and the php_pdflib.dll in the extensions directory (eg. C:\php\ext). Also, make sure that the PHP directory is in your system’s PATH environment variable.
http://www.mediafire.com/file/li2ezpnt1ipljj4/php_pdflib-2.1.8(PDFlib-8.0.2p3)_php-5.3.5-Win32-VC9-x64.zip
Jesper
Great work Anindya. Have now installed the extension with your 5.3.5 and it shows up on phpinfo(); will now need to upgrade my license from 7 to 8, but that is the minor problem π
Thank you very much
/Jesper
Maz
I have a quick question for you. I just purchased an Itanium server, and I was wondering if you could compile an IA-64 Non-Thread Safe version of PHP, or if you could point me in the right direction on how to do so. I’m new to compiling things on Windows.
jason
Hello, Anindya .
Could I get pecl-5.3.5-nts-Win32-VC9 for X86 system?
pecl4win.php.net is not working.
Anindya Author
@Maz
Sorry for the late reply.
Unfortunately, I don’t think I will be able to compile IA64 binaries. I am not even sure if it is possible to compile IA64 Windows binaries of PHP. And even if it were possible, it would be very complicated since many of the extensions require external libraries and you will have to separately compile IA64 binaries of those libraries too, depending on the extensions you need. Also, compiling on Windows is not as simple as compiling on Linux. Just setting up the build environment can be a difficult or time consuming process. So, I think you are better off using the official 32 bit PHP binaries on your itanium server.
@jason
You can get pecl extensions for 32 bit PHP from here. I hope you find the extension you are looking for. If not, let me know.
Martin
Is it possible that you compile ioncube loader for php 5.3 x64?
Anindya Author
Nope. Not possible, since source code for ioncube loader isn’t available. You will have to use 32 bit PHP if you need the ioncube loader. You can also contact them about it and see what they say.
Sam
is there any way you could somehow make a windows installer package for php5.3.5 64bit?
(My question may sound stupid considering im kinda new to php(: … )
Thanks in advance!
Anindya Author
@Sam
Unlike Apache, the PHP configuration file (php.ini) doesn’t have multiple references to various directories. So, it is easy to install PHP in any directory of your choice even without an installer, which is why I didn’t create installers for PHP. If you want to use PHP with Apache, you can find installation instructions on this page. Let me know if you have any problems during installation. I will be glad to help you out. π
Dave
Thank you Anindya! You are doing a great service for all us Windows x64 people. Keep up the great work it is very much appreciated!
Arin
Does this 64-bit version of PHP for windows operate like the 64-bit PHP for linux?
One thing I tested for upon installation is variable handling.
On 32-bit PHP (windows/linux) intval() will return a maximum value of 2147483647 (maximum positive signed int value).
On this 64-bit version of PHP, intval() will return the same max value of 2147483647.
As noted under the “return values” section of “PHP: intval – Manual” (see php.net), this should not be the case in 64-bit — “The maximum signed integer value for 64 bit systems is 9223372036854775807.”
Though integer variable values in this 64-bit version of PHP do indeed exceed the 32-bit signed limit of 2147483647.
Otomatic
Hello,
Is there possible to have php-5.3.6-Win32-VC9-x64.zip with the same extensions that for PHP 5.3.5
Thanks
Anindya Author
@Dave
You’re welcome. π
@Arin
No, unfortunately this 64 bit version of PHP for Windows does not operate like 64 bit PHP for Linux. And I believe it’s because of this reason that there aren’t any official 64 bit versions of PHP for Windows.
@Otomatic
I was thinking about compiling and posting it today but didn’t get time. Will compile and post it tomorrow. π
Sam
@Anindya
I’m really, really really really sorry i have’nt replied sooner but iv’e been caught up in work and literally had no free time on my hands to get php working… i appreciate the patience and appreciat the help.
Anyway, i’ve followed the instructions on that link you’ve gave me and i just can’t get it work!
i don’t know why and no know errors have been displayed. I’m going to try it once more in the next couple of days and i will get back too you… if it fails again then i will try and just find a php x64 5.3.5 .msi. Thanks for all the help and i will get back to you as soon as i can (a little ironic!)
Anindya Author
@Sam
As I said, manual installation of PHP is really easy. Assuming that you are using the Apache HTTP Server, here are a few simple steps to install PHP.
1. Download the thread safe PHP 5.3.6 zip archive from here.
2. Extract the zip archive to C:\php.
3. Rename the “php.ini-development” file in C:\php to “php.ini”.
4. Open your Apache’s httpd.conf file (usually located at C:\Program Files\Apache Software Foundation\Apache2.2\conf) and add the following at the end.
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php"
5. Then save your httpd.conf file and restart Apache.
That’s it. PHP is installed. You can test it by creating a php file (info.php for example) in your Apache’s htdocs folder, adding the line <?php phpinfo(); ?> in that file, and then opening it with your browser (eg. http://localhost/info.php).
Let me know if you have problems with any of the above steps. π
Sam
Ok thanks a lot for all the help and i will try it today in about an hour or something and btw… on your 64 bit version of php 5.3.6 i’m just wondering (because i’m a newbie!) why the files say x32???
Anyway, thanks again and i will do it agaon in about an hour. THANKS!
Anindya Author
Those files say “Win32” not “x32”. You should see “x64” at the end of the file names. Also, 32 bit is called “x86” and not “x32”, just so you know. π
Anyway, those files were automatically generated during the build process. So, the PHP developers are the ones who chose to name those files like that. By “Win32” they are probably referring to the Windows API.
Mario
Hallo.
Have you got a compiled saprfc for win 64 bit version?
Thanks.
Anindya Author
Hi Mario. No, I do not have compiled saprfc extension. But I will try to compile and post it soon. π
Walter
Seems the PDFlib link is dead
Walter
This is great work! I’m glad I tripped over your site.
My turn to ask…
Any ideas on “php_http.dll” and “php_memcache.dll” ??
Thanks again
Walter
Your x64 memcache DLL link is now working. It wasn’t for most of yesterday.
Thanks again.
Walter
Anindya Author
Get the pecl archive from the PHP 5.3.6 post. Has all the extensions you are looking for. And the link is working fine at the moment.
I will be compiling newer versions of those extensions along with the next version of PHP 5.3.
ikhsan
hi anindya, i love your work
but some problem happen to me, i have w2k3 and IIS 6 x64, then add php handler using your PHPx64 via ISAPI
phpinfo() work fine and mysql module loaded (it shown mysqlnd on phpinfo),
when i try to connect to local mysql server using both localhost and 127.0.0.1 it’s just display a blank page.
but mysql work properly using console
what’s going on, some trouble on php or my iis setting?
chitra
i require php_http.dll for x86 for php5.3.5
How can i get this
Regards,
Chitra.
Anindya Author
@ikhsan
I just tested on my Windows XP machine and mysql seems to be working fine. Database connection was established successfully. Make sure that you have enabled the php_mysql.dll extension in php.ini. You will see a mysqlnd section in phpinfo() even with the php_mysql.dll disabled.
@chitra
Here you go. http://www.mediafire.com/file/kfifnkby3m14ezc/php_http-1.7.0-5.3-vc9-x86.zip
Reynier de la Rosa
Hi, your post its amazing, its the all in one that i was searching, im new in all this about compiling code and i dont know hoy to do that cuz im using SQL Server so i use the new microsoft driver for PHP but they donΒ΄t realease any version in x64.
could you explain me how you compile, or if you know some place that i can downloaded it compiled i will apreciate so much
thanks a lot!!!
Anindya Author
@Reynier de la Rosa
Hi. Sorry for the late reply. Unfortunately, it is not possible to compile a 64 bit version of the SQL Server driver for PHP.