#44682 [NEW]: system/exec/shell_exec a php script doesn't work in background

From: Date: Thu, 10 Apr 2008 10:37:01 +0000
Subject: #44682 [NEW]: system/exec/shell_exec a php script doesn't work in background
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-124130@lists.php.net to get a copy of this message
From: saveweb at inwind dot it Operating system: Windows PHP version: 5.2.5 PHP Bug Type: PHP options/info functions Bug description: system/exec/shell_exec a php script doesn't work in background Description: ------------ I want to start a php script in background. I have a page that starts the php-win.exe passing parameters and it must not wait for the result. example: exec ("c:/php/php-win.exe test.php") where test.php is the script that must run in background. I want that my start page does not wait the execution of php-win.exe. I made a lot of tests using exec, system, shell_exec etc and changing parameters. examples: exec ("c:/php/php-win.exe test.php &"); exec ("c:/php/php-win.exe test.php > out"); exec ("c:/php/php-win.exe test.php 1> out 2>out &"); exec ("start c:/php/php-win.exe test.php > out"); etc. etc. but nothing. 2 strange things: 1) in the past using php4 it worked fine. 2) if i try to start another command (not php-win.exe) it works fine (example: exec("test.exe &")): the process starts in background and the page doesn't wait. Expected result: ---------------- expected result: the php script starts and run in background the page doesn't wait the end of php-win.exe Actual result: -------------- The start page waits until the script ends -- Edit bug report at http://bugs.php.net/?id=44682&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44682&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44682&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44682&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44682&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44682&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44682&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44682&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44682&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44682&r=support Expected behavior: http://bugs.php.net/fix.php?id=44682&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44682&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44682&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44682&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44682&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44682&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44682&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44682&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44682&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44682&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44682&r=mysqlcfg

« previous php.bugs (#124130) next »