exec() : Works on command line but not via web

Debian (Raspbian)
php version: 5.6.17-0+deb8u1

I want to execute shell commands for local use using exec() - or similar.

If I execute my program via the command line it works fine but I can’t get it to work via a web page. I’ve tried altering permissions and ownership and tried what I know about in php.ini to no avail. I’ve also tried using the same php.ini for both but no luck. :frowning:

Typical command: exec(‘pkill tmux’);

Any suggestions please?

Are you on shared hosting? If so, some commands are removed as to not crash the server for everyone else.

Thanks for your reply.
No, this is my own personal network.

Might look at this in that case.

Sponsor our Newsletter | Privacy Policy | Terms of Service