我正在使用Ubuntu上的Nginx和PHP-FPM。我试图从Web应用程序启动一个PHP任务。
当我从CLI运行文件时,以下两个示例都可以正常工作,但从Nginx无法正常工作。
exec("notify-send 'Starting master at ".date("h:m:s")."'");
echo exec("/home/rohit/Projects/webapp/console/index.php blast 23");
这两个在CLI和Nginx中都能正常工作。
echo exec("whoami");
echo exec("pwd");
我尝试将PHP-FPM用户从www-data更改为我的用户名rohit,但没有成功。我哪里做错了吗?
E_ALL
和display_errors=on
? - tylerl