...

View Full Version : Resolved changing master value phpinfo



durangod
08-05-2012, 10:16 PM
Hi, alittle background first:

I am on a new server and i did a phpinfo and it showed date.timezone as europe/moscow. I am in the USA and so is my host so i dont know whats up with that. When i notified my host they told me they changed it but that was two days ago and it is still showing moscow.

Now for what i did to try to fix this myself:

So what i did was i went into htaccess and used php_value to change the date.timezone to "America/Denver" which worked but it only changed the local value not the master value under DATE header in phpinfo.

I have done some reading and as i understand it, if you set the date.timezone in php.ini then it will change the master value, and then to change the local value you can use htaccess.

I did try to use this in php.ini to change the master value but it did not change.



date.timezone = "America/Denver"
i also tried
date.timezone = "US/Mountain"



Neither of these worked to change the master value, so my question is how do i change the master value, or can i?

AndrewGSW
08-05-2012, 10:26 PM
How to change default timezone in PHP
Make a file called timezone.php with this in it .
PHP Code:
<?
date_default_timezone_set ( "America/Denver" )
?>

and change this line in php.ini

auto_prepend_file = /home/users/web/bxxxx/pow.username/htdocs/timezone.php

From here (http://forums.powweb.com/showthread.php?t=82493). Apparently the ini settings can be over-ridden by a server setting.

Dormilich
08-06-2012, 07:35 AM
does it have to be the master value? as long as it *is* changed, does it matter where?

durangod
08-06-2012, 07:41 PM
does it have to be the master value? as long as it *is* changed, does it matter where?

I suppose not, i am concerned that it is moscow to begin with but i suppose as long as the local value is correct, it does not matter what the master value is (i hope so anyway). That is another reason i asked because i dont know for sure, and i also wanted to learn something from this.

Keleth
08-06-2012, 11:50 PM
Well, basically, no. It doesn't matter what the global value is if the local value is what you want it at. For example, a lot of sites like you pick your timezone. Then as far as the PHP is concerned, you are in that timezone, and of course, that's not changing the server value. Specially if you can't get in on the .ini, the local value is the best you can do (or the htaccess).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum