Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anyone else have these errors?


Stealth1

Recommended Posts

Trying to rid my site of any and all errors and these 3 are probably all related but I can't seem to find how to resolve them.

 

Big Thanks to FWR and his KissER contribution for making it easy to track and fix errors that you may not know your site even has.

 

Error: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/New_York' for 'EST/-5.0/no DST' instead
File: includes/languages/english.php
Line: 316
Error: strftime() [<a href='function.strftime'>function.strftime</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/New_York' for 'EST/-5.0/no DST' instead
File: includes/modules/new_products.php
Line: 16
Error: strftime() [<a href='function.strftime'>function.strftime</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/New_York' for 'EST/-5.0/no DST' instead
File: includes/footer.php
Line: 23

Link to comment
Share on other sites

Bump for help

Quit panicking. Those aren't really errors at all. It's just telling you that using date() or other time-conversion call in PHP carries the risk that your server's default timezone may not match up with your timezone. Unfortunately, the base osC does not have a good way to set the timezone to be used to yours (or your signed-on customers). In PHP 4 and earlier, about all you do is add an offset (seconds) to time() before formatting it with date(). In PHP 5, there are some functions to properly set your timezone and use that, but AFAIK it's not implemented in osC.

 

If you're running on PHP 5 (and everybody should be by now, as PHP 4 is unsupported), you could certainly add a date_default_timezone_set('your timezone name'); at the top of application_top.php. It would be quite a bit more work to get the timezone setting for each registered customer (entered at registration) and use that, but it is possible.

Link to comment
Share on other sites

Quit panicking. Those aren't really errors at all. It's just telling you that using date() or other time-conversion call in PHP carries the risk that your server's default timezone may not match up with your timezone. Unfortunately, the base osC does not have a good way to set the timezone to be used to yours (or your signed-on customers). In PHP 4 and earlier, about all you do is add an offset (seconds) to time() before formatting it with date(). In PHP 5, there are some functions to properly set your timezone and use that, but AFAIK it's not implemented in osC.

 

If you're running on PHP 5 (and everybody should be by now, as PHP 4 is unsupported), you could certainly add a date_default_timezone_set('your timezone name'); at the top of application_top.php. It would be quite a bit more work to get the timezone setting for each registered customer (entered at registration) and use that, but it is possible.

 

Phil, not so much panicking just want to get rid of as many "errors" and as much "bad code" as I can.

 

It appears the function wasn't present in my php.ini so I set it to my local and the errors are gone now.

 

Any chance you want to help me with these errors as I couldn't get help from the STS thread.

 

Error: Undefined index: sts_debug
File: includes/classes/sts.php
Line: 127
Error: Undefined index: sts_template
File: includes/classes/sts.php
Line: 137
Error: Undefined property: sts::$display_debug_output
File: includes/classes/sts.php
Line: 71
Error: Undefined variable: greeting_box_top_string
File: includes/functions/general.php
Line: 1358

Link to comment
Share on other sites

Whoever wrote those diagnostics "erred" in calling them errors. They're just advice that if your server time doesn't match up with your time, you won't see the correct time and date. If you're on PHP 5, you can set your local timezone to use on date() etc. calls. There doesn't appear to be any easy way for individual customers to see their correct local time, not without adding a timezone field to their address information. So, you can choose to deal with these inconveniences (wrong timezone listed), but please stop calling them "errors".

 

As for the STS problems, I don't use STS and can't help you with that. STS is fairly popular, so someone should come along soon who has experience in it. Did you have any "failures" reported when either adding STS or removing it at some point? A failure to completely add a contrib can omit needed code (e.g., that sets array elements by index), and a failure to completely remove a contrib can likewise remove the setting of array elements, but leave in place the use of an array element (that's no longer set). If you have experienced errors or failures while adding/removing STS, you may want to refresh all your PHP code with fresh copies from the 2.2 RC2a installation package, and re-install all your contribs/add-ons, paying close attention to any reports of problems.

Link to comment
Share on other sites

Whoever wrote those diagnostics "erred" in calling them errors. They're just advice that if your server time doesn't match up with your time, you won't see the correct time and date. If you're on PHP 5, you can set your local timezone to use on date() etc. calls. There doesn't appear to be any easy way for individual customers to see their correct local time, not without adding a timezone field to their address information. So, you can choose to deal with these inconveniences (wrong timezone listed), but please stop calling them "errors".

 

As for the STS problems, I don't use STS and can't help you with that. STS is fairly popular, so someone should come along soon who has experience in it. Did you have any "failures" reported when either adding STS or removing it at some point? A failure to completely add a contrib can omit needed code (e.g., that sets array elements by index), and a failure to completely remove a contrib can likewise remove the setting of array elements, but leave in place the use of an array element (that's no longer set). If you have experienced errors or failures while adding/removing STS, you may want to refresh all your PHP code with fresh copies from the 2.2 RC2a installation package, and re-install all your contribs/add-ons, paying close attention to any reports of problems.

 

Hey Phil, ok totally get what your saying. I put the necessary info in the php.ini file and all those reports are gone now.

 

As far as STS I believe the main contributor is bkellum and I posted in the support thread about the 3 things being reported and he said he wasn't going to waste his time going through the contribution for old/bad code. So I am stuck hoping someone may have had these errors or can give me instructions to fix them. I may just remove STS as it seems to be a huge pain to use with highly modified sites, I just installed it early just in case I decided to use it down the road but right now I have no intentions so may just remove it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...