note 31942 added to ref.exec
| From: | leenoble at spammenot dot ntlworld dot com | Date: | Fri, 09 May 2003 14:37:32 +0000 |
| Subject: | note 31942 added to ref.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47745@lists.php.net to get a copy of this message | ||
Even I typed in the full path to a command none of the shell functions worked at all.
exec("/usr/bin/mygoodcommand");
...just didn't produce results.
The command was world executable and ran fine from the shell. But after playing with the 2>&1
thing I established that "mygoodcommand" needed all of its commands to be path specific
too. In my case I was attempting to dump a processed uploaded spreadsheet to a database with the
command:
mysql --local-infile -u supportadmin --password='*******' personnel <
/Users/leenoble/Sites/Websites/Support/data/updateexec.sql
In order for this to work I had to add:
/usr/local/mysql/bin/ to the mysql command to make it work. I hope this helps stop someone else from
tearing their hair out in frustration.
--
http://www.php.net/manual/en/ref.exec.php
http://master.php.net/manage/user-notes.php?action=edit+31942
http://master.php.net/manage/user-notes.php?action=delete+31942
http://master.php.net/manage/user-notes.php?action=reject+31942