If you want to execute shell commands as root theres another solution too try this: shell_exec('sudo -u root ls -l /var/tmp') but the solution Of shawn is better then it will not needed to set it again in another commands
If you want to execute shell commands as root theres another solution too try this: shell_exec('sudo -u root ls -l /var/tmp') but the solution Of shawn is better then it will not needed to set it again in another commands