#23092 [Opn->Bgs]: exec("foo.php") hangs

From: Date: Wed, 23 Apr 2003 09:07:51 +0000
Subject: #23092 [Opn->Bgs]: exec("foo.php") hangs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38170@lists.php.net to get a copy of this message
ID: 23092 Updated by: sniper@php.net Reported By: jlg at huelladigital dot net -Status: Open +Status: Bogus Bug Type: Program Execution Operating System: Redhat 7.3 (kernel 2.4.18) PHP Version: 4.3.2-RC New Comment: Remove those hasbang lines and it will work fine. Previous Comments: ------------------------------------------------------------------------ [2003-04-08 02:46:22] jlg at huelladigital dot net I did, with no result. I also tried the other execution functions: passthru(), system(), shell_exec() and proc_open(). I tried, as well, redirecting the output to /dev/null &. The result was always the same. ------------------------------------------------------------------------ [2003-04-07 17:56:03] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-04-07 10:06:08] jlg at huelladigital dot net I have php compiled as cgi in /usr/local/bin/php: ./configure --with-mysql --enable-ftp --enable-sockets --with-ncurses --enable-cgi I have 2 scripts, named foo1 and foo2: foo1: #!/usr/local/bin/php <?php exec("./foo2"); ?> foo2: #!/usr/local/bin/php <?php print "foo"; ?> When I call foo1 from shell the result is OK (it echoes "foo"). But when I call it as a cgi (http://myserver/cgi-bin/foo1) it calls recursively the script "foo2" and hangs. I must restart apache. It is Apache/1.3.27. The script directory cgi-bin has "Options ExecCGI" directive. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23092&edit=1

« previous php.bugs (#38170) next »