note 23966 rejected from function.shell-exec by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 04:53:18 +0000 |
| Subject: | note 23966 rejected from function.shell-exec by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48439@lists.php.net to get a copy of this message | ||
Note Submitter: tecknojunky@tecknojunky.com
----
This script:
...
elif [ "$1" = "ALL" ]; then
NOW=
/bin/date +%s
START=$(/bin/date -d "sed -n -e 's/Log\ started\ on\ //p'
uptime.log" +%s)
echo -n $(expr $NOW - $START)
...
gives 2075955 on the console, which is correct. In PHP, it gives 40799.
I narrowed the problem down to being the date -d line that does not seem to parse correctly to PHP.
I use date without -d in other places and it gives the same result as on the terminal.
PHP is buggy x(