Php Fatal Error..

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
Paddy93
Posts: 16
Joined: 18 Feb 2011, 21:42

Php Fatal Error..

Post by Paddy93 »

Hey there,

today I set up my second (first was at Windows enviroment) up, but after hours of failuresearch I gave up, so I'm asking you here.

I have updated PHP with all extensions (I think^^), but I get this error everytime:

Code: Select all

PHP Fatal error:  Uncaught exception 'ErrorException' with message '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_timezone_set() 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/Berlin' for 'CET/1.0/no DST' instead' in /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php:114
Stack trace:
#0 [internal function]: ManiaLive\Application\ErrorHandling::createExcpetionFromError(2, 'date(): It is n...', '/home/trackmani...', 114, Array)
#1 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(114): date('d.m.Y')
#2 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(56): ManiaLive\Application\ErrorHandling::displayAndLogError(Object(ErrorException))
#3 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/AbstractApplic in /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php on line 114

Fatal error: Uncaught exception 'ErrorException' with message '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_timezone_set() 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/Berlin' for 'CET/1.0/no DST' instead' in /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php:114
Stack trace:
#0 [internal function]: ManiaLive\Application\ErrorHandling::createExcpetionFromError(2, 'date(): It is n...', '/home/trackmani...', 114, Array)
#1 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(114): date('d.m.Y')
#2 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(56): ManiaLive\Application\ErrorHandling::displayAndLogError(Object(ErrorException))
#3 /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/AbstractApplic in /home/trackmania/manialive/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php on line 114
my linux timezone is also right.
Do you have any ideas how to solve this problem?

Thanks in advance,
Paddy
Group leader: onkelz_chris
User avatar
aloukat
Posts: 17
Joined: 20 Feb 2011, 15:33
Location: Münster
Contact:

Re: Php Fatal Error..

Post by aloukat »

Try This in you're php.ini (/etc/php5/cli)

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Berlin"

; http://php.net/date.default-latitude
;date.default_latitude = 31.7667

; http://php.net/date.default-longitude
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333
if nothing goes right, go left!
nocturne
Posts: 208
Joined: 23 Jun 2010, 21:31

Re: Php Fatal Error..

Post by nocturne »

Shouldn't of even bothered answering.. The cause is directly cited in the error, even stating how to fix it.. :lol:

All kidding aside, though.. It's certainly bad coding practice by the ML team to leave this function open to error (and a fatal error at that) in the case of using default php configs (afterall, there are a good many users with no access to their php config). It'd be much better to fetch the timezone setting first from the config, and if it's not set then simply use the date_default_timezone_get function to retrieve the timezone settings from the system (and possibly a small warning message advising the operator to set the value in their config). Hopefully it's just a small embarrassing oversight, which will be fixed in the near future.
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest