Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    95
    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
    95
    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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    95
    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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    95
    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. Replies: 13
    Last Post: 8 Feb 2016, 05:13 PM
  2. v151 PHP warning: It is not safe to rely on the system's timezone settings.
    By cseright7 in forum General Questions
    Replies: 12
    Last Post: 24 Oct 2015, 05:46 AM
  3. Replies: 5
    Last Post: 9 Jun 2015, 04:54 AM
  4. v150 Warning: strtotime(): It is not safe to rely on the system's timezone settings.
    By Sanguinarius in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 29 Jul 2013, 11:40 PM
  5. PHP 5.3 - Warning: date() [function.date]
    By stride-r in forum Installing on a Mac Server
    Replies: 2
    Last Post: 3 Apr 2010, 04:47 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR