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

From: Date: Tue, 08 Apr 2003 07:46:23 +0000
Subject: #23092 [Fbk->Opn]: exec("foo.php") hangs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37336@lists.php.net to get a copy of this message
 ID:               23092
 User updated by:  jlg at huelladigital dot net
 Reported By:      jlg at huelladigital dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Program Execution
 Operating System: Redhat 7.3 (kernel 2.4.18)
 PHP Version:      4.3.1
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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



Thread (5 messages)

« previous php.bugs (#37336) next »