| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 137958 | 2014-09-15 00:49:00 | PHP timezone problems; date.timezone local and master values return "no value" | Agent_24 (57) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 1383975 | 2014-09-15 00:49:00 | I have just installed Lighttpd, MariaDB and PHP on a Lubuntu 14.04 machine and have some problem with the timezone in PHP. (www.tecmint.com) Everything seems to be working but the setup script for Partkeepr stops with the error: "The PHP timezone () is not set or invalid. Please set the correct timezone in your php.ini file (don't forget to restart the web server afterwards)" This was normal last time, I set the timezone in php.ini and everything was OK. Although last time I did this I was using Apache, I don't know if it makes a difference. This time, I set the timezone and it doesn't work. If I run phpinfo() I get this: date date/time support enabled "Olson" Timezone Database Version 0.system Timezone Database internal Default timezone Pacific/Auckland 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 But run $ php -i | grep "timezone" in the terminal and it's all OK! Default timezone => Pacific/Auckland date.timezone => Pacific/Auckland => Pacific/Auckland What is going on here? |
Agent_24 (57) | ||
| 1383976 | 2014-09-15 02:37:00 | Solved! Even though php --ini only returns: Configuration File (php.ini) Path: /etc/php5/cli Loaded Configuration File: /etc/php5/cli/php.ini Scan for additional .ini files in: /etc/php5/cli/conf.d Additional .ini files parsed: /etc/php5/cli/conf.d/05-opcache.ini, /etc/php5/cli/conf.d/10-pdo.ini, /etc/php5/cli/conf.d/20-curl.ini, /etc/php5/cli/conf.d/20-gd.ini, /etc/php5/cli/conf.d/20-imagick.ini, /etc/php5/cli/conf.d/20-json.ini, /etc/php5/cli/conf.d/20-mysql.ini, /etc/php5/cli/conf.d/20-mysqli.ini, /etc/php5/cli/conf.d/20-pdo_mysql.ini, /etc/php5/cli/conf.d/20-readline.ini I had to also edit /etc/php5/cgi/php.ini as well. |
Agent_24 (57) | ||
| 1 | |||||