In a PHP program(php1.php) i have a system() call like this:
system('/usr/local/bin/sh php2.php arg1');
The original PHP program (php1.php) when executed hangs. It stops responding. But if the system call is commented the program works fine.
The second PHP file (php2.php) when executed from the command line works fine. But when the same php2.php is called from the php1.php using the system() the code stops responding.
What might be the reason?