I'm geting when I just do phpinfo()
Warning: phpinfo(): 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/Helsinki' for 'EET/2.0/no DST' instead in /myadmin/i.php on line 8
here is i.php :
<?php
//echo date_default_timezone_get();
date_default_timezone_set("Europe/Kiev");
//echo date("l");
phpinfo();
?>
And as you can see, when I do date_default_timezone_set("Europe/Kiev") I get:
Notice: date_default_timezone_set(): Timezone ID 'Europe/Kiev' is invalid in /myadmin/i.php on line 4
I'm sure I'm using valid timezone string from here, and I did set :
date.timezone = Europe/Kiev
in php.ini file.
Environment: CentOS 6 , nginx/1.1.11 , PHP 5.3.8 (fpm-fcgi)
I really can't understand what's a matter. Thank you.
Thanks to the comments, I was able to solve my problem. What I've done, in console:
It required c compiler:
...so I did:
Also, if you get an error about the make command, simply run
Finally, try again:
...it displays at the end:
I added "extension=timezonedb.so" to /etc/php.ini, and restarted php-fpm:
To extend futureboxlab's solution, you may encounter another error regarding the 'make' command if you don't have make installed. In that case you'll just need to run
then, once again (third time's the charm)