You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

FYI: date.timezine and mysql.sock issues resolved!

For anyone who might run into the same issues with your website(s) like I did. Here are a couple things you may want to look into if you are having these issues.

The cause of these issues is due to snow leopard server using PHP 5.3.

*_ISSUE #1_*: PHP throwing the following errors:

*
+Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date default_timezoneset() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /path/to/my/www/wp-includes/functions.php on line 35+

+Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date default_timezoneset() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /path/to/my/www/wp-includes/functions.php on line 43+

+Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date default_timezoneset() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /path/to/my/www/wp-includes/functions.php on line 35+

+Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date default_timezoneset() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /path/to/my/www/wp-includes/functions.php on line 43+
*

*_FIX FOR ISSUE #1:_* Set "date.timezone = "YOUR TIMEZONE"" value in your /etc/php.ini. Here is the list of timezones http://nl3.php.net/manual/en/timezones.america.php. Then restart web service in server admin.

*_ISSUE #2_:* PHP throwing error "+Warning: mysql_connect() [function.mysql-connect]: [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock)+"

*_FIX FOR ISSUE #2:_* Set "mysql.default_socket" value in your /etc/php.ini to "mysql.default_socket = /var/mysql/mysql.sock". Then restart web service in server admin

2008 MacPro Dual Quad Core (8core) 2.8GHz, Mac OS X (10.6)

Posted on Aug 28, 2009 3:33 PM

Reply
6 replies

Sep 19, 2009 2:43 PM in response to davidh

Didn't resolve it for me using 10.6.1 server. I tried adding each of the following in php.ini (not all at the same time, one by one...). Restarted web service after each change (even though you don't really need to).

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = 'America/Los_Angeles'
date.timezone = 'PDT'
date default_timezone_set('America/LosAngeles')
date default_timezone_set("America/LosAngeles")

Same error in the logs with any of these enabled:
[Sat Sep 19 14:33:32 2009] [error] [client xxx.xxx.xxx.xx] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date default_timezoneset() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/share/squirrelmail/functions/date.php on line 289, referer: https://icecrown.hri.uci.edu/webmail/src/webmail.php

I'm not running any PHP other than webmail anyway and it seems to be working fine (Besides not being able to get vacation replies working) but I haven't done a lot of sending / receiving since this is a test box.

Dec 4, 2009 12:32 PM in response to Lola Lee

The cause of these issues is due to snow leopard server using PHP 5.3.


We too just upgraded to PHP 5.3 and now we have logs filled with the "date(): It is not safe to rely on the system's timezone settings..." messages. Tried the above setting of date.timezone in /etc/php.ini but it didn't make any difference. FWIW, the message complains "We selected 'America/Los_Angeles' for 'PST/-8.0/no DST'" and lists webmail.php as the referrer. Where is this file?

I've searched the disk for webmail.php but came up with no hits. Does anyone know where this file resides? I'd like to have a look at it to see what it's feeding data.php as parameters.

Feb 6, 2010 2:58 PM in response to Transini

Hello, I got the same problem, watch this in my phpinfo :

Loaded Configuration File /private/etc/php.ini
Default timezone Europe/Berlin

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

In my /etc/php.ini :
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Paris"

But it's make no difference !!!

any idea please ?

Thanks
Apiarnaud

http://www.apimo.com

FYI: date.timezine and mysql.sock issues resolved!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.