note 99505 added to ref.exec

From: Date: Fri, 20 Aug 2010 15:02:37 +0000
Subject: note 99505 added to ref.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-171890@lists.php.net to get a copy of this message
Within Linux, when calling the php interpreter directly from popen, or other program execution function to execute a script, it appears as though the script perpetually fails and re-executes. i.e. popen("php myscript.php&", "w"); // fail As each re-execution causes the executing script to load under a new PID, it is incredibly difficult to identify and kill the process manually. THE SOLUTION: At http://thecodeabode.blogspot.com/ 2010/08/calling-php-interpreter-within-web.html the solution proposed was to ensure the executing script has a valid shebang, and execute permissions. This allows you to execute the script directly i.e. popen("./myscript.php", "w"); // ok ---- Server IP: 69.147.83.197 Probable Submitter: 60.226.132.118 ---- Manual Page -- http://www.php.net/manual/en/ref.exec.php Edit -- https://master.php.net/note/edit/99505 Del: integrated -- https://master.php.net/note/delete/99505/integrated Del: useless -- https://master.php.net/note/delete/99505/useless Del: bad code -- https://master.php.net/note/delete/99505/bad+code Del: spam -- https://master.php.net/note/delete/99505/spam Del: non-english -- https://master.php.net/note/delete/99505/non-english Del: in docs -- https://master.php.net/note/delete/99505/in+docs Del: other reasons-- https://master.php.net/note/delete/99505 Reject -- https://master.php.net/note/reject/99505 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171890) next »