问题
I am trying to install PHP 5 on a Windows Server 2003 environment with IIS 6
After installing PHP, and making the necessary changes in IIS, I get the following error
%1 is not a valid Win32 application.
- The server is not 64bit, it is 32bit. I have added the FastCGI handler in Web Service Extensions,
- I have added the PHP handler in
- Web Service Extensions, I have also gone to "Web Sites Properties" and clicked on Configuration: and set the appropriate mappings,
- I've installed the reditrubition files as required by Microsoft...
I cannot for the life of me work out why it is not working.
Can someone please help?!
回答1:
Finally got my installation working by installing the correct corresponding versions and dependencies. I hope this helps.
On IIS 6
- PHP 5.4
- VC9 x86 or x64
- WinCache 1.3 for PHP 5.4
On IIS 7
- PHP 5.5
- VC11 x86 or x64
- WinCache 1.3 for PHP 5.5
回答2:
Try running PHP directly from command line to see if you receive the same error. If it is, the issue may be that a dependency cannot be found. PHP has a dependency on the Visual C++ Redistributable - from http://windows.php.net/download/ :
- The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.
- The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed.
if this doesn't help, run the Microsoft utility Depends.exe from http://www.dependencywalker.com/ to find out what might be the issue.
回答3:
in System Properties > Environment Variables click on new in variable name = path and variable value = C:\wamp\bin\php\php5.3.13; and click on ok > ok > ok click on run type cmd in cmd type php if you get up error in cmd type cd c:\ and enter now type php
回答4:
I have faced the same issue on standalone Apache+PHP setup on Windows 10. Definitely the problem was in two different PHPs in the environment variable PATH (IIS distro and standalone distro). Removing the PHP for IIS from the PATH resolved the problem.
回答5:
Unfortunately PHP only goes as far as 5.4 on Windows 2003. They officially dropped support for Windows XP and 2003 starting PHP 5.5.0.
http://windows.php.net
回答6:
Here you can find PHP for older Windows systems: PHP 5.5.7, 5.4.23, 5.3.28 (x86/x64) available
Following binaries are available:
- php-5.5.7-nts-Win32-VC11-x86.zip
- php-5.5.7-Win32-VC11-x86.zip
- php-5.5.7-nts-Win32-VC11-x64.zip
- php-5.5.7-Win32-VC11-x64.zip
- php-5.4.23-nts-Win32-VC9-x86.zip
- php-5.4.23-Win32-VC9-x86.zip
- php-5.4.23-nts-Win32-VC9-x64.zip
- php-5.4.23-Win32-VC9-x64.zip
- php-5.3.28-nts-Win32-VC9-x86.zip
- php-5.3.28-Win32-VC9-x86.zip
- php-5.3.28-nts-Win32-VC9-x64.zip
- php-5.3.28-Win32-VC9-x64.zip
For "FastCGI" on Windows Server 2003, you should choose php-5.4.23-nts-Win32-VC9-x86.zip.
来源:https://stackoverflow.com/questions/17692255/installing-php-5-on-windows-server-2003-1-is-not-a-valid-win32-application