Any idea why I can execute command from Command Line but not From PHP exec()

自古美人都是妖i 提交于 2019-12-05 16:27:31

Typically this is a path problem. The application you're trying to call is probably not in the search path of the web server's user account. I only call applications from PHP using the full path. I store that path in settings files so it works across any system it's used on.

I am sure php runs as the user running your apache, and this is most often nobody (a user without rights to create directories). Try to create your output somewhere where everyone is allowed to write and check the user apache runs under.

Check if you are currently running PHP in safe_mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!