-
Running 32bit PHP on Windows 2003 x64 Bit.
Posted on October 29th, 2009 No commentsOne of our Windows VPS was having trouble executing php on 64bit Windows 2003 server. The installation for php and adding ISAPI modules were all done properly but still we were receiving “HTTP 500 Internal Server Error” for phpinfo.php file. OR you may receive ” %1 is not a valid Win32 application”
This is because you are running 32bit PHP application to work on a 64bit machine. So In order to configure IIS to run in 32-bit mode you need to execute the following command on command prompt:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
This will set the Enable32bitAppOnWin64 metabase property to True.
Restart IIS from the Console and that should show you the phpinfo.php page easily. Please note that IIS 6.0 does not support running in both 32-bit and 64-bit modes at the same time so in other words this is an ‘all or nothing’ system wide setting which affects all IIS web sites on the server, so if you need to run both 32-bit and 64-bit applications in IIS you will either have to locate them on separate machines or run them all in 32-bit mode.
After this we had Invalid Memory Execution error. So we had to change the Memory limit to 32MB for php based application since the VPS was only having 256MB memory.



Recent Comments