Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2008
    Posts
    87
    Plugin Contributions
    0

    Default PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the syste

    Hi,

    I have patched as given in instructions and all files needed to be patched were never modified by me. So it was a clean patch.

    But after patch, site started to function normally but if i go to admin login page im getting following errors.

    Somebody please help me as without admin access its not possible to run site.

    ~ Time
    Zencart version 1.3.8a
    MySQL version 5.1.41
    Apache version 2.2.15
    PHP version 5.3.2

    ==================================
    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/New_York' for 'EDT/-4.0/DST' instead in /home/public_html/admin/includes/languages/english/email_extras.php on line 40

    Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/admin/includes/languages/english/email_extras.php:40) in /home/public_html/admin/includes/init_includes/init_templates.php on line 36

    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/New_York' for 'EDT/-4.0/DST' instead in /home/public_html/includes/functions/specials.php on line 54

    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/New_York' for 'EDT/-4.0/DST' instead in /home/public_html/includes/functions/specials.php on line 29

    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/New_York' for 'EDT/-4.0/DST' instead in /home/public_html/includes/functions/featured.php on line 53

    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/New_York' for 'EDT/-4.0/DST' instead in /home/public_html/includes/functions/featured.php on line 29

    Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/admin/includes/languages/english/email_extras.php:40) in /home/public_html/admin/includes/functions/general.php on line 21

  2. #2
    Join Date
    Sep 2008
    Posts
    87
    Plugin Contributions
    0

    Default Re: PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the s

    sorry i forget to add link of patch http://www.zen-cart.com/forum/showthread.php?t=140960

    ~ Time

  3. #3
    Join Date
    Jan 2004
    Posts
    59,807
    Blog Entries
    4
    Plugin Contributions
    133

    Default Re: PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the s

    This doesn't look like it's related to the patch at all, but rather it's a problem with your server's PHP configuration.
    Quote Originally Posted by time111 View Post
    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/New_York' for 'EDT/-4.0/DST' instead ...
    ie: the error message suggests that your php.ini settings have 'EDT/-4.0/DST' set as your timezone setting, which is clearly invalid, and should be more like 'America/New_York' instead.

    If you're not already aware of how to edit php.ini settings for your particular site, I suggest you contact your hosting company for specific instructions as it relates to what they'll allow you to do on your site with their servers.

    This is not a Zen Cart issue. It's a PHP configuration issue which is triggered when the very simple common "date()" function is called within PHP. If you fix your timezone settings in your PHP configuration, the problem should go away.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Sep 2008
    Posts
    87
    Plugin Contributions
    0

    Default Re: PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the s

    Hi,

    I forwarded request to server people for time zone issue, lets see what happens.

    But what about last error issue:

    Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/admin/includes/languages/english/email_extras.php:40) in /home/public_html/admin/includes/functions/general.php on line 21
    And one more thing is the php.ini override can be placed in admin/php.ini. As its there for suhosin.session.encrypt = off. If so then what is the code to put time edit also in that, ill try the code if you give me.

    ~Time
    Last edited by time111; 17 Mar 2010 at 03:59 PM.

  5. #5
    Join Date
    Jan 2004
    Posts
    59,807
    Blog Entries
    4
    Plugin Contributions
    133

    Default Re: PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the s

    Your "headers already sent" message is a direct result of the error message preceding it. Fix the root issue and the others will go away.

    As to your php.ini settings, I suggest you look for the timezone that was rejected in the error message and replace it with what it says it recommended.
    or you can look it up at www.php.net
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Sep 2008
    Posts
    87
    Plugin Contributions
    0

    Default Re: PHP 5.3 problem: Warning: date() [function.date]: It is not safe to rely on the s

    Hello,

    Thank you and it looks like issue resolved.

    I have added following line in admin/php.ini file

    PHP Code:
    date.timezone "America/New_York" 
    Here you can see more time zones http://www.php.net/manual/en/timezones.php

    ~Time

 

 

Similar Threads

  1. Easy Populate and the Date added updated to todays date issue.
    By cyphercys in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 9 Mar 2010, 04:26 AM
  2. Change Gregorian Date To Shamsi(Jalali) Date
    By Persain-Dev in forum General Questions
    Replies: 5
    Last Post: 3 Oct 2009, 01:59 PM
  3. Account Created date showing as todays date
    By PatF in forum Managing Customers and Orders
    Replies: 10
    Last Post: 20 Nov 2008, 03:04 PM
  4. Quick Question: Date Expected vs Date Added
    By ymbd in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 16 Aug 2008, 05:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •