View Issue Details

IDProjectCategoryView StatusLast Update
0001252Xdebugpublic2016-02-11 11:19
Reportertomolimo Assigned Toderick  
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformIIS7.5 - PHP7.0.2 x64OSWindowsOS Version7
Product Version2.4.0rc3 
Summary0001252: HTTP 500.0 Internal server error when assigning an array returned by a function to $_GET
Description

Hello,
Here is my configuration:
PHP version 7.0.2 x64
PHP Extension Build => API20151012,NTS,VC14
XDebug: php_xdebug-2.4.0rc3-7.0-vc14-nts-x86_64.dll

The following code issues an error HTTP 500.0 Internal server error if run within IIS,
and crashes also if run in CLI

<?php
function retArray( ) {
return array( 'hello' => 'world' ) ;
}
$_GET = retArray( ) ;
print_r( $_GET ) ;
?>

If xdebug extension is disabled, then the result is OK:
Array
(
[hello] => world
)

Steps To Reproduce

Create a script with content:

<?php
function retArray( ) {
return array( 'hello' => 'world' ) ;
}
$_GET = retArray( ) ;
print_r( $_GET ) ;
?>

Try it with "php -f myscript.php"

and if xdebug is enabled you should get an error.

Additional Information

xd.log content:

Log opened at 2016-01-13 14:12:29
I: Connecting to configured address/port: 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/inetpub/wwwroot/glpi090/index2.php" language="PHP" protocol_version="1.0" appid="9812" idekey="MoronO"><engine version="2.4.0RC3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2015 by Derick Rethans]]></copyright></init>

<- breakpoint_set -i x0-10000 -t exception -x "Fatal error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x0-10000" id="98120001"></response>

<- breakpoint_set -i x1-10001 -t exception -x "Parse error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x1-10001" id="98120002"></response>

<- breakpoint_set -i x2-10002 -t exception -x "Unknown error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x2-10002" id="98120003"></response>

<- feature_get -i 3 -n max_children
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="3" feature_name="max_children" supported="1"><![CDATA[32]]></response>

<- run -i 4

Content of System event viewer:
Faulting application name: php.exe, version: 7.0.2.0, time stamp: 0x568d8165
Faulting module name: php_xdebug-2.4.0rc3-7.0-vc14-nts-x86_64.dll, version: 2.4.0.7, time stamp: 0x566c8937
Exception code: 0xc0000005
Fault offset: 0x0000000000019dba
Faulting process id: 0x2654
Faulting application start time: 0x01d14e0c6fc63261
Faulting application path: C:\Program Files\PHPx64-7.0\php.exe
Faulting module path: C:\Program Files\PHPx64-7.0\ext\php_xdebug-2.4.0rc3-7.0-vc14-nts-x86_64.dll
Report Id: ae0e1327-b9ff-11e5-95f9-54b5e2041910

TagsNo tags attached.
Attached Files
phpinfo.log (33,052 bytes)
Operating SystemWindows 7 Enterprise Edition
PHP Version7.0-dev

Activities

tomolimo

2016-01-26 14:01

reporter   ~0003433

Hello,
I made a test with 2.4.0rc4: the error is still present.
regards,
Tomolimo

derick

2016-02-08 21:15

administrator   ~0003461

Could you please try 2.4.0RC4 and see whether that fixes the problem?

tomolimo

2016-02-10 15:09

reporter   ~0003474

Hello,
I made a test on Jan 26th...
https://bugs.xdebug.org/view.php?id=1252#c3433
But if you want I can try again :)
regards,
Tomolimo

tomolimo

2016-02-10 15:22

reporter   ~0003475

Hello again,
The bug is still existing...
When you try to execute this PHP script
<?php
function retArray( ) {
return array( 'hello' => 'world' ) ;
}
$_GET = retArray( ) ;
print_r( $_GET ) ;
?>
with CLI (when xdebug module is loaded in php.ini) you get an abnormal program termination, and when xdebug is not loaded, then you get the normal following output:
Array
(
[hello] => world
)

regards,
Tomolimo

tomolimo

2016-02-11 07:41

reporter   ~0003477

Hello,
I made a new test with PHP 7.0.3 x64 and then now it's OK the bug has disappeared!
Regards,
Tomolimo

derick

2016-02-11 11:19

administrator   ~0003478

Issue has gone away, let's consider it fixed. Please feel free to reopen if the same issue returns.

Issue History

Date Modified Username Field Change
2016-01-13 14:18 tomolimo New Issue
2016-01-13 14:18 tomolimo File Added: phpinfo.log
2016-01-26 14:01 tomolimo Note Added: 0003433
2016-02-08 21:15 derick Note Added: 0003461
2016-02-08 21:15 derick Assigned To => derick
2016-02-08 21:15 derick Status new => feedback
2016-02-10 15:09 tomolimo Note Added: 0003474
2016-02-10 15:09 tomolimo Status feedback => assigned
2016-02-10 15:22 tomolimo Note Added: 0003475
2016-02-11 07:41 tomolimo Note Added: 0003477
2016-02-11 11:19 derick Note Added: 0003478
2016-02-11 11:19 derick Status assigned => resolved
2016-02-11 11:19 derick Resolution open => unable to reproduce
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)