%1 is not a valid Win32 application PHP & Windows Server 2003 64bit

If you are getting error, chances are you are trying to run a 32-bit PHP within IIS on a windows server  2003 (64bit) server or later.

“If you plan to run 32-bit applications on 64-bit Windows, you must configure IIS to create 32-bit worker processes.”
http://blogs.technet.com/b/mbaher/archive/2006/12/17/running-iis-32-bit-applications-on-iis-64-bit.aspx

To fix this error you have to do one of the followings:

1. The best way is to run PHP native 64bit version
Find a  64 bit PHP and use it (chances are it is not going to be the latest).
http://www.iis-aid.com/

2. The Other way
Configure IIS to create 32-bit worker processes and run the 32 bit version
http://blogs.technet.com/b/mbaher/archive/2006/12/17/running-iis-32-bit-applications-on-iis-64-bit.aspx
http://support.microsoft.com/?id=894435


Other References
http://www.iisadmin.co.uk/?p=14

Let's share thisShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn