note 59698 deleted from function.exec by danbrown

From: Date: Sun, 04 Jan 2009 16:26:11 +0000
Subject: note 59698 deleted from function.exec by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148803@lists.php.net to get a copy of this message
Note Submitter: rassehund at gmail dot com ---- I spent quite a lot time fixing problem of invoking scripts in Linux remotly. In the beginning I thought that it was a problem of exec() function, than I thought that something wrong in Apache server, cos through the web server you are NOBODY and have no rights to invoke scripts in Linux. so for example in my php script I had such line : exec ('pathToScript/script.sh &'); If to start my php script with such line in the linux shell like : php myphp.php everything is perfect. But if to do the same through the server than problem occurs. I solved this problems with sudoers file in Linux. U needn't change anything in Apache or in php script. Just find sudoers in your system and add there rights to NOBODY.

« previous php.notes (#148803) next »