|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9428 CGI error when executing php script in a virtual directory
Submitted: 2001-02-23 13:17 UTC Modified: 2002-02-02 06:41 UTC
Avg. Score:3.7 ± 1.6
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: kevin at ig dot utexas dot edu Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.0.4pl1 OS: NT4 SP6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: kevin at ig dot utexas dot edu
New email:
PHP Version: OS:


 [2001-02-23 13:17 UTC] kevin at ig dot utexas dot edu
I have PHP 4.0.4pl1 installed on an NT4 (SP6) Server
running IIS 4.0. 

Executing PHP scripts in a directory under www_root
works fine. 

When the simplest helloworld script is executed on
a virtual directory, I get 

"The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"

I've tried telnetting to the server and getting the file
to see what headers are returned: 

HTTP/1.1 502 Gateway Error
Server: Microsoft-IIS/4.0
Date: Fri, 23 Feb 2001 18:10:22 GMT
Content-Length: 215
Content-Type: text/html

<head><title>Error in CGI Application</title></head>
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not returning a complete set of HTTP headers.  The headers it did return are:<p><p><pre></pre>Connection closed by foreign host.

I've seen a couple of references to this problem on, but no solutions. Any ideas? Thanks.

Kevin Johnson


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-12 06:56 UTC]
Can you reproduce this with 4.1.1?
 [2002-02-02 06:41 UTC]
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".
 [2002-08-30 04:17 UTC] t dot cannaerts at unec dot be dot remove dot this dot bit
I have the same problem with IIS5 on Win2K, PHP 4.2.2. This isn't a virtual directory (VD) problem, though it is often experienced when adding a VD. This occurs when you are trying to access a page to which the Internet Guest account (IUSR_SERVERNAME) doesn't have any rights to. This means you need to set NT-permissions on the physical folder where the files reside, which is often forgotten when creating a VD. I don't know why or who (PHP, IIS?) returns the header, but it should return a permission denied instead. Hope this info helps.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 22:01:33 2024 UTC