[ACCEPTED]-php date.timezone not working correctly for command line script only-php

Accepted answer
Score: 22

CLI and webserver (and cgi and fpm) use 5 different php.ini-files. Because you say you see 4 the right value in you browser I guess you 3 edited the wrong one. On cli type

php --ini

To find 2 out, which is the one you must edit. It's 1 the one in the second line, for example

Loaded Configuration File:         /etc/php5/cli/php.ini
Score: 1

Some servers(Like media temple) do the configurations 5 for the particular domains.So the server 4 will access the common php.ini file which 3 is under the /etc/php.ini but the browser 2 access the domain's php.ini file.It may 1 occurs the problem

More Related questions