PHP exec() will not execute shell command when executed via browser

Add 2>&1 to the end of your command to redirect errors from stderr to stdout. This should make it clear what’s going wrong.

Leave a Comment