php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47410 array_combine() crashing code when in the background
Submitted: 2009-02-16 20:01 UTC Modified: 2009-03-02 01:00 UTC
From: helenadeus at gmail dot com Assigned:
Status: No Feedback Package: Arrays related
PHP Version: 5.2CVS-2009-02-16 (snap) OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: helenadeus at gmail dot com
New email:
PHP Version: OS:

 

 [2009-02-16 20:01 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-21 13:29 UTC] felipe@php.net
I can't reproduce it.
 [2009-02-22 18:23 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2009-03-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC