I am trying to install PHP 5 CGI version release candidate 1 on Windows 2000 / IIS5.
All I get is CGI timeout after several minutes for a page containing <?php phpinfo(); ?>
I upped the time out to 900 seconds...same result.
Here's what I did:
Extracted zip to C:\PHP
Copied php.ini-recommended to C:\Windows and renamed to php.ini Copied php.exe and php5ts.dll to C:\windows\system32 edited php.ini and set:
cgi.force_redirect = 0
extension_dir = "c:\php"
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1 in a later stage see below.
doc_root = "C:\inetpub\wwwroot" but later removed it see below.
In Internet Information services
Added .php to C:\php\php.exe, all verbs, script engine, check that file exists.
Changed permissions to script and executable.
on both the virtual directory as well as the top layer \ properties\www service \edit etc.
PHP -i works fine when run from C:\PHP AND from within the virtual directory
I have also tried to run with just one line in PHP.ini: cgi.force_redirect = 0
Also added C:\PHP to the Path
Added IUSR_computername with EXEC, Read privileges for C:\PHP the windows\system32\php5ts.dll and php.exe as well as the virtual directory.
I do notice that php.exe runs as a process after I call up a php page from the browser as 3840 Kb which probably indicates the DLL is loaded as well as php.exe is only 28 KB.
Also followed the two tips below from www.php.net/faq:
Finally got IIS 5 and PHP 5 to talk.
1) Set [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
W3SVC\Parameters\Script Map]
".php"="your path to php\php.exe"
2) ensure there is not a php.ini in the windows system folder and that there is one wherever you've put PHP
3) edit php.ini and set cgi force redirect to 0 and cgi.rfc2616_headers = 1
4) Put the PHP scripts in their own folder underneath the inetpub root
5) Open the IIS console, right click your new php folder In the Directory tab set application name to the name of the folder set executable and script as permission set application protection to low Click configuration and check that .php is mapped to wherever you put PHP
Restart IIS
I figured out why i get this error with just a virtual directory and not the root:
doc_root =
set it to nothing so that it does not only look for that directory. I hope it helps people with IIS and PHP
I consistently get the same error:
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.
Your insights are appreciated!
Thanks,
Rolf