OS2 World.Com Forum
2012.02.10, 00:51:40 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Apache, PHP and Timezones  (Read 11903 times)
RobertM
Global Moderator
Hero Member
*****
Posts: 1936



View Profile WWW
« on: 2009.09.05, 06:20:40 »

Hey all,

Most of you may never have run into this - but I just did, and figured I would pass it along in case it would help someone else.

I've got a WAMP setup on my system, that among other things (Typo3, Joomla, WordPress, SMF) I use to query Amazon AWS for product information. AWS requests are time sensitive. Thus, for me, it would not work unless I set my clock 4 hours ahead.

Here's why. PHP (and/or Apache) with the timezone properly set in php.ini were getting confused because of the TZ string format in eCS's config.sys file.

The format (for compatibility with PHP) apparently should not be:
SET TZ=PST8PDT,3,2,0,7200,11,1,0,7200,3600

But instead should be:
SET TZ=PST8PDT

Note: Of course, substitute for your correct timezone... mine actually should read EST5EDT

More hints & info here (PHP is not the only thing affected by this):
http://www.deltasys.org/ecsindex.html

For those of you making time sensitive PHP requests to other servers, hopefully this will help.

Best,
Rob
« Last Edit: 2009.09.05, 21:29:14 by RobertM » Logged

|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|

Ben
Sr. Member
****
Posts: 348


What is really important?


View Profile WWW
« Reply #1 on: 2009.09.05, 17:29:41 »

Hey.

Thanks for the heads-up.

I'll give that a try.
Logged

Andi
Full Member
***
Posts: 229


View Profile
« Reply #2 on: 2009.09.07, 17:36:48 »

The additional settings in eComStation are needed for 'daylight saving time' changes AFAIK. Probably you do not need it if you get the actual time from a time server or simply never want to let eCS change DST by itself.

Michal explained this in the OpenWatcom bug tracker (http://bugzilla.openwatcom.org/show_bug.cgi?id=834). If you encounter such problems maybe it depends on the compiler which is used for your app. If you use Pauls builds it does not hurt to ask him about that.

I wonder if these additional settings are even there if you deselect the option in the eCS installer.
« Last Edit: 2009.09.07, 17:40:56 by Andi » Logged
RobertM
Global Moderator
Hero Member
*****
Posts: 1936



View Profile WWW
« Reply #3 on: 2009.12.04, 00:07:12 »

Interesting thing... for some reason, my TZ variable was reset to the original (which made my PHP/Amazon AWS stuff stop working again)... I thought I had disabled the eCS clock program, but I guess I need to doublecheck that, as I am guessing that may be the cause.

-Rob
Logged

|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|

RobertM
Global Moderator
Hero Member
*****
Posts: 1936



View Profile WWW
« Reply #4 on: 2009.12.10, 04:31:16 »

Interesting thing... for some reason, my TZ variable was reset to the original (which made my PHP/Amazon AWS stuff stop working again)... I thought I had disabled the eCS clock program, but I guess I need to doublecheck that, as I am guessing that may be the cause.

-Rob

The CLKBASIC.EXE RUN statement in the config.sys file needs to be disabled to allow the timezone to not be changed to something that does not work with Apache.
Logged

|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|

Andi
Full Member
***
Posts: 229


View Profile
« Reply #5 on: 2009.12.10, 13:48:48 »

IIRC there is a check box in one of the eCS clock settings which is labeled something like 'allow to change config.sys'. Wonder if this would have cured your problem too.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!