Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Date function error with upgrade of php on server - please help


buckandzinkos

Recommended Posts

Posted

We need help figuring out how to either turn off error reporting in ecommerce 2.2 completely or figure out a way that php 5.3 will correctly read the date function. If anyone can help with some insight it would be greatly appreciated. The website is: http://www.buckandzinkos.com and the error message is below:

 

-------------------------------------------------------------------------------------------

 

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /var/www/vhosts/buckandzinkos.com/httpdocs/includes/languages/english.php on line 321

Posted

// Turn off all error reporting

error_reporting(0); // place this in Application_top

ini_set('display_errors','0'); // place this in Application_top

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

I have added:

 

error_reporting(0);

ini_set('display_errors','0');

 

to application_top.php file in both "admin/includes" AND "/includes" and it has solved the problem. I also used the notes //turn error reporting on or off for future reference.

 

Thank you.

Posted

Nice to know your problem got solved.

This is much needed as a security concern.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

  • 10 months later...
Posted

Turning off error reporting is not the answer you are just hiding problems that are slowing your site down.

 

If you want to see how many errors your site is generating then install KissER which will allow you to deal with your errors cleanly and without users seeing them.

 

As far as this error is concerned you simply need to set: -

 

Replace Europe/London with your own timezone

 

date_default_timezone_set( 'Europe/London' ); 

 

Near the top of includes/application_top.php

Posted

Or, you can put

date.timezone = 'Europe/London'

in your php.ini file.

 

Yes good point MrPhil.

 

I suppose it would depend if we are talking the main php.ini or server set ups where they allow localised php.ini.

 

To my current knowledge if the sites server wide were same locale then the main php.ini would be a good server wide time saver.

 

if not you could go php.ini ( if the server allowed such ) or the php function date_default_timezone_set() in the bootstrap so I would probably go for the PHP function for compatibility I guess.

Archived

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

×
×
  • Create New...