View Issue Details

IDProjectCategoryView StatusLast Update
0000399Xdebugpublic2009-11-27 16:55
Reportercchubb Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
Summary0000399: Error 502.2 Bad Gateway always thrown on Vista
Description

PHP 4.3.11 (cgi-fcgi) (built: Mar 30 2005 17:34:09)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Xdebug v2.1.0-dev, Copyright (c) 2002-2008, by Derick Rethans
Vista Business 32 Bit
IIS 7
Running PHP as a CGI

When I use either the php_xdebug.dll provided in the PHP Binary for 4.3.11 or the one provided with Activestate Komodo 4, the output of "php -v" tells that the module is loaded and "php -i" via the command line indicates that the xdebug module is loaded.

When requested through the web browser the output is always
HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".

Commenting the
zend_extension_ts="C:/PHP/extensions/php_xdebug.dll"
line in the php.ini returns the php to working on the web site and serving requests as expected.

Additional Information

Other tests I have done:
Set xdebug.remote_autostart=0 and xdebug.remote_enable=0
Result: Failure, still throws a 502.2

Tried the php_xdebug.dll from PECL (for version 4.3.11)
Result: Failure to load php_xdebug.dll

Turned on ALL error logging in the php.ini and log to a file. No errors are written if the php_xdebug.dll is loaded, normal errors are written if no xdebug is loaded.

xdebug.remote_log=C:/PHP/XDebug2/Log.txt is set in the php.ini, but no errors are being written there.

Checked the server event logs and the IIS Admin error logs. Nothing is written when the 502.2 error is thrown except for the server log indicating a call to the .php script and the 502.2 error return code.

I have to work in PHP 4.3.11 because I am supporting legacy scripts that haven't been upgraded to PHP5 (or even 4.4)

So, in summary, the headers are not being returned from xdebug, no errors are trapped and logged and I don't know where to look next.

Tagsgdfg
Operating SystemWindows Vista Business 32bit
PHP Version4.3.11

Relationships

duplicate of 0000410 closed Apache crashes on Vista with xDebug installed 

Activities

cchubb

2008-08-16 16:34

reporter   ~0000873

I turned on super extended tracing in IIS and here is the pertinent call:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>4</Level>
<Opcode>3</Opcode>
<Keywords>0x20</Keywords>
<TimeCreated SystemTime="2008-08-16T15:24:08.650Z"/>
<Correlation ActivityID="{00000000-0000-0000-B000-0080000000FB}"/>
<Execution ProcessID="3184" ThreadID="5176"/>
<Computer>RIO</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-B000-0080000000FB}</Data>
<Data Name="CommandLine">C:\PHP\php.exe</Data>
<Data Name="ErrorCode">0</Data>
<Data Name="ProcessId">4228</Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>CGI_LAUNCH</Opcode>
<Keywords>
<Keyword>CGI</Keyword>
</Keywords>
<freb:Description Data="ErrorCode">The operation completed successfully.
(0x0)</freb:Description>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{E2E55403-0D2E-4609-A470-BE0DA04013C0}</EventGuid>
</ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>4</Level>
<Opcode>6</Opcode>
<Keywords>0x20</Keywords>
<TimeCreated SystemTime="2008-08-16T15:24:08.650Z"/>
<Correlation ActivityID="{00000000-0000-0000-B000-0080000000FB}"/>
<Execution ProcessID="3184" ThreadID="5176"/>
<Computer>RIO</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-B000-0080000000FB}</Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>CGI_REQUEST_ENTITY_SENT</Opcode>
<Keywords>
<Keyword>CGI</Keyword>
</Keywords>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{E2E55403-0D2E-4609-A470-BE0DA04013C0}</EventGuid>
</ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>3</Level>
<Opcode>16</Opcode>
<Keywords>0x100</Keywords>
<TimeCreated SystemTime="2008-08-16T15:24:12.347Z"/>
<Correlation ActivityID="{00000000-0000-0000-B000-0080000000FB}"/>
<Execution ProcessID="3184" ThreadID="5176"/>
<Computer>RIO</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-B000-0080000000FB}</Data>
<Data Name="ModuleName">CgiModule</Data>
<Data Name="Notification">128</Data>
<Data Name="HttpStatus">502</Data>
<Data Name="HttpReason">Bad Gateway</Data>
<Data Name="HttpSubStatus">2</Data>
<Data Name="ErrorCode">3221225477</Data>
<Data Name="ConfigExceptionInfo"></Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
<Keywords>
<Keyword>RequestNotifications</Keyword>
</Keywords>
<freb:Description Data="Notification">EXECUTE_REQUEST_HANDLER</freb:Description>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
</ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
<EventID>0</EventID>
<Version>1</Version>
<Level>3</Level>
<Opcode>18</Opcode>
<Keywords>0x100</Keywords>
<TimeCreated SystemTime="2008-08-16T15:24:12.347Z"/>
<Correlation ActivityID="{00000000-0000-0000-B000-0080000000FB}"/>
<Execution ProcessID="3184" ThreadID="5176"/>
<Computer>RIO</Computer>
</System>
<EventData>
<Data Name="ContextId">{00000000-0000-0000-B000-0080000000FB}</Data>
<Data Name="ErrorDescription">The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".</Data>
</EventData>
<RenderingInfo Culture="en-US">
<Opcode>SET_RESPONSE_ERROR_DESCRIPTION</Opcode>
<Keywords>
<Keyword>RequestNotifications</Keyword>
</Keywords>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>
</ExtendedTracingInfo>
</Event>

It shows that PHP spent about 3.7 seconds processing the request, which seems about right for the actual call to the index.php. But nothing is returned from php when xdebug is enabled.

cchubb

2009-05-05 21:24

reporter   ~0000957

I can confirm that this behavior is happening in PHP 5.2.9-2 but only when sending a Location: tag. Other page output is now working.

The exact headers I am writing in PHP when I get the problem is:

header('HTTP/1.1 302 Found');
header('Location: http://localhost:8081/index.php/');
exit('small chunk of html with the location info');

Issue History

Date Modified Username Field Change
2008-08-16 16:13 cchubb New Issue
2008-08-16 16:34 cchubb Note Added: 0000873
2009-05-05 21:24 cchubb Note Added: 0000957
2009-07-20 06:12 user996 Tag Attached: gdfg
2009-11-27 16:55 derick Relationship added duplicate of 0000410
2009-11-27 16:55 derick Duplicate ID 0 => 410
2009-11-27 16:55 derick Status new => resolved
2009-11-27 16:55 derick Resolution open => duplicate
2009-11-27 16:55 derick Assigned To => derick
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)