Re: GNU/Linux & MacOsX Server different behaviour
| From: | Brent Baisley | Date: | Tue, 28 Sep 2004 17:31:23 +0000 |
| Subject: | Re: GNU/Linux & MacOsX Server different behaviour | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198090@lists.php.net to get a copy of this message | ||
Reading the man page on a Mac it says that you are trying to set the system date if you provide a date, which you need to be root to be able to do. If you just run your command in the shell, you'll see that you get an operation not permitted error. Using the -r switch you can provide the seconds since Epoch to just display a 'date' you specify.
For instance:
date -r 978400000 +%a
Returns 'Mon'
Check the shells you are running, the Mac defaults to bash under 10.3. You can always switch the default shell to get different behavior.
On Sep 28, 2004, at 12:51 PM, Francesco Casalena wrote:
Hi, I've an Apple G5 Xserve with MacOsX server 10.3 (Darwin 7.3.1) and PHP 4.3.2 and I need to run a PHP script containing this line: Linux: $temp=shell_exec("date 01/01/2004 +%a"); Mac: $temp=shell_exec("date 010104 +%a"); (man date says me how to write correctly date string in both cases) On Linux result is correct (e.g.'Mon'), on Mac output is empty. Is it a PHP problem, a php.ini lack (on Mac) or a permissions problem? Or anything else? Regards, thanks! Ciao Francesco ----------------------------------------------------------- Leggi la tua email con il tuo cellulare! Grazie a I.Box puoi leggere la tua email di superEva da SMS e dalla segreteria! http://webmail.supereva.it/ibox/ ----------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577