|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-12 01:19 UTC] jani@php.net
[2008-04-13 08:41 UTC] saveweb at inwind dot it
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 23:00:01 2025 UTC |
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