Problems with timezones?

So here I am trying to install modx revolution on a Virtual LAMP server hosted somewhere outside my home.

After setting up the basic things on the VPS such as Apache2, MySQL-server and the such I download modx revolution, crete a database for it and go to the setup page only to be greeted by this:

FATAL ERROR: MODx Setup cannot continue.
To use PHP 5.3.0+, you must set the date.timezone setting in your php.ini. Please do set it to a proper timezone before proceeding. A list can be found here.

Thanx for that curveball..
After a bit of googling you learn that you need to set up you date and timezones properly sure enough you type
dpkg-reconfigure tzdata
and set your timezone, but it still doesn’t work so you figure out that you need to edit your php.ini because as of PHP5.3 the timezone isn’t set by default in php.ini anymore. Fine..

find / -name php.ini


so you edit them all adding the line
ini_set('date.timezone', 'Europe/Stockholm');
under the Date section in your php.ini files and it still doesn’t work..?!?! WTF?!

Seems to work for a lot of other people but not for you?! I don’t know why but what you can do is to add the following
ini_set('date.timezone', 'Europe/Stockholm');
assuming that it is modx you’re working on..
(Thank you mvladk for helping me with this solution)
This issue is not a modx specific issue and unfortunatly I don’t know how to solve the real issue so I have had to accept this solution instead.

This entry was posted in IT, Linux and tagged , , , , , . Bookmark the permalink.

2 Responses to Problems with timezones?

Leave a Reply

Your email address will not be published. Required fields are marked *