I just was able to fix this.Actually php exec('whoami') was working but the httpd command was not. So after allowing apache to run commands with visudo and then ##Defaults requir... [by hercent]
on 01/12/2013 – Made popular on 01/12/2013
I made changes to the httpd.conf file. How do I reload the new config changes without restarting the Apache 2 web server under Debian / CentOS Linux operating systems?Read answer to: "Apache 2: Reload HTTPD Configuration File Without Restarting Apache Config Changes"