【发布时间】:2013-07-06 20:39:26
【问题描述】:
我正在尝试 fork 一个 php 脚本并使用 pcntl_exec 命令执行另一个 php 脚本,但出现以下错误:
pcntl_exec(): Error has occured: (errno 13) Permission denied
在函数中正常分叉后,我正在尝试以下代码:
$pathToFile="/var/www/html";
$outputfile =array("mytestfile.php");
if ($pid) // parent
{
$pid_arr[$i] = $pid;
}
else // child
{
pcntl_exec($cmd,$outputfile);
return "error occurred in child";
}
所有其他 pcntl 函数都可以正常工作,我也在我的目录上尝试了 chmod 和 chown 命令,但 pcntl_exec 仍然无法正常工作。请告诉我我做错了什么?
提前致谢!!
【问题讨论】:
-
好像是权限问题,我能确切知道您使用的是哪个环境吗? (操作系统)?
-
我在 ubuntu 上使用灯..