Re: exec in CLI vs. mod_php

From: Date: Fri, 30 May 2003 15:01:45 +0000
Subject: Re: exec in CLI vs. mod_php
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-2093@lists.php.net to get a copy of this message
So, does this mean that because of FP, we are stuck? There is something sad about that. But, Brian Foddy emailed me a work around to my solution. | I don't know if this helps, or is restating the obvious... | Using 4.2.3 and apache 1.3.21 (php_mod) (yes, rather old combo, hopefully | this behavior hasn't changed in newer versions) I can | achieve what you want by | exec ($execute_cmd, $exec_array, $exec_return); | where $execute_cmd = "/apps/soc/paging/send_page.pl > /dev/null &"; | (a perl script). The web page returns immediately and the perl script | starts executing in the background until its finished. Unfortunately the | web user has no way to know when/if the script finishes or with what | status. | | Brian So, for now, I will pursue that method. Brian Moon dealnews.com ----- Original Message ----- From: "Zeev Suraski" <zeev@zend.com> To: "Wez Furlong" <wez@thebrainroom.com> Cc: "Brian Moon" <brianm@dealnews.com>; <internals@lists.php.net> Sent: Friday, May 30, 2003 9:54 AM Subject: Re: [PHP-DEV] exec in CLI vs. mod_php | At 17:44 30/05/2003, Wez Furlong wrote: | >I think I did check, but there were no useful comments. | >if close()ing them before exec'ing is a problem, can't we just set the | >close-on-exec flag on the fd's ? | > | >This will cause the descriptors to be dup'd for the fork, and the | >duplicates to be closed when the child execs; in theory, that will leave | >the parent in a fit and healthy state. | | This whole problem didn't add up to me - it didn't sound too logical to | begin with. Anyway - after some archeological searches in my mailbox from | 1998 (never erase email!) - here's the real reason. | | http://www.phpbuilder.com/mail/php3-list/199805/1391.php | | Zeev | | |

« previous php.internals (#2093) next »