Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default A different - Warning: strtotime() [function.strtotime]: It is not safe to rely

    There are two zencarts on this server

    1.39h runs fine

    1.53 not so much
    I get this error when trying to access the admin page
    Warning: strtotime() [function.strtotime]: 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 'UTC' for 'AWST/8.0/no DST' instead in /home/example/public_html/example/login.php on line 13
    I have read and followed the below (post 2 part c for zen 1.53)
    https://www.zen-cart.com/showthread....HP-5-3-5-4-5-5

    and that has made no effect whatsoever to the login error, although the new timezone added does appear (with the correct time) in the green menu bar in admin, so it isn't misspelled.

    Steps to get into zen 1.53 (because I think my post may be confusing)

    1) go to my admin page, presented with the above Warning message above my login box
    2) I put in my login credentials hit enter
    3) presented with a blank page with only the warning message on it no login box, no admin page
    4) In my address bar delete the /login.php part of the URL address and then press enter
    5) Admin page appears and works fine

    Note the 1.39h store admin on the same server account works perfectly no login issues
    Webzings Design
    Semi retired from Web Design

  2. #2
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: A different - Warning: strtotime() [function.strtotime]: It is not safe to rely

    Knew i forgot something

    PHP Version 5.3.29
    Webzings Design
    Semi retired from Web Design

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: A different - Warning: strtotime() [function.strtotime]: It is not safe to rely

    Quote Originally Posted by nigelt74 View Post
    I get this error when trying to access the admin page
    That isn't an error, it is a warning. As a general rule a warning will have no other ill effects, so you could be barking up the wrong tree.

    What does raise a bit of an alem though is this
    "We selected 'UTC' for 'AWST/8.0/no DST' instead in /home/example/public_html/example/login.php on line 13"

    The /home/example/public_html/ looks positively wrong. Not saying it *is* wrong, but it certainly isn't 'normal'

    I would hazard a guess and suggest that this seemingly erroneous path is being derived from the settings in your configuration file(s).

    Cheers
    RodG

  4. #4
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Solved i think

    Hi RodG

    Nope thats my fault in obfuscating the paths, I shouldn't have used example for both thingies

    /home/example/public_html/example/login.php

    should be

    /home/site-account/public_html/secret-admin/login.php



    anyway it seems to be working now I added the following line
    Code:
    date.timezone = "Australia/West"
    to the php.ini file, and no errors appear and login is smooth as a smooth thing

    Just have to monitor that hasn't caused any other issues

    Cheers
    Webzings Design
    Semi retired from Web Design

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Solved i think

    Quote Originally Posted by nigelt74 View Post
    Hi RodG
    Nope thats my fault in obfuscating the paths, I shouldn't have used example for both thingies
    Well, that certainly made diagnosis of the problem so much easier didn't it. <gggrrrrrrr> <smile>

    Quote Originally Posted by nigelt74 View Post
    Just have to monitor that hasn't caused any other issues
    No, that won't cause any other issues at all. That is one of several viable and valid methods of setting the PHP timezone. (Not all methods are suitable for all server configurations, but whichever method is used/tried it will either work or not work, and when it works it will work 'correctly' with no further repercussions.

    Only one 'teeny' thing to consider is that this setting only affects the timezone that PHP uses. Your SQL database could be in a different timezone, and the server itself in yet *another* timezone. These different timezones don't affect functionality of anything in any way, but it is something to be aware of if/when setting up 'cron' jobs and/or reviewing any log files.

    Cheers
    RodG

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Solved i think

    v139 doesn't do anything with timezones at all.
    v153 had code in it to attempt to help keep both server and db timezones in sync regardless of server admin errors, but PHP 5.3 did some different stuff.
    v1.5.4 should have it "right" now, as long as you set your timezone in the extra_datafiles file.
    .

    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.

 

 

Similar Threads

  1. Replies: 13
    Last Post: 8 Feb 2016, 05:13 PM
  2. Replies: 1
    Last Post: 18 Dec 2015, 12:46 AM
  3. 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
  4. Replies: 5
    Last Post: 27 Feb 2012, 08:56 PM
  5. Replies: 5
    Last Post: 17 Mar 2010, 06:36 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR