ID: 47410
Updated by: [email protected]
Reported By: helenadeus at gmail dot com
Status: Open
Bug Type: Arrays related
Operating System: Linux
PHP Version: 5.2CVS-2009-02-16 (snap)
New Comment:
I can't reproduce it.
Previous Comments:
------------------------------------------------------------------------
[2009-02-16 20:01:34] helenadeus at gmail dot com
Description:
------------
I'm running a script which tries to run something else in the
background, like such:
This code is inside a script called waiting.php
<?php
popen("php -f stall.php > tmp &','r');
?>
and stall.php is:
<?php
$V=array_combine(array('a','b','c'),array(1,2,3));
foreach ($V as $k=>$v) {
echo $V[$k].chr(10);
}
?>
It works fine... until I use the function "array_combine" in the
script stall.php
For some reason, even though this function works fine both in the
console and through apache, it crashes my code whenever I try to run
it in the background. Any thoughts on why this happens?
Reproduce code:
---------------
This code is inside a script called waiting.php
<?php
popen("php -f stall.php > tmp &','r');
?>
and stall.php is:
<?php
$V=array_combine(array('a','b','c'),array(1,2,3));
foreach ($V as $k=>$v) {
echo $V[$k].chr(10);
}
?>
Expected result:
----------------
tmp:
1
2
3
Actual result:
--------------
tmp is empty
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47410&edit=1