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 は動作しません。私が間違っていることを教えてください。
前もって感謝します!!