开发者

Problem with exec in PHP

I am running through a weird problem with exec's in PHP. When I load in the browser the script x.php, the browser hangs and when I run a ps I can see multiple threads being created. The only way to stop them is by resta开发者_C百科rting apache.

However, instead of running a php script, if I do something like system('ls'), it works fine. So it seems to be problem when a PHP script tries to run another script using exec/system/passthru (I've tried them all).

x.php is defined as following:

<?php
var_dump(system('php -f t.php'));
?>

t.php is defined as following:

<?php
echo 'Hello world';
?>


Take a look at first comment in exec() manual.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜