note 31942 deleted from ref.exec by cmb
| From: | cmb@php.net | Date: | Sun, 24 Feb 2019 09:28:04 +0000 |
| Subject: | note 31942 deleted from ref.exec by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210278@lists.php.net to get a copy of this message | ||
Note Submitter: leenoble at spammenot dot ntlworld dot com
----
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.