Forums / General Questions / can't log in to admin

can't log in to admin

Views: 1,084

Results 1 to 10 of 10
21 Dec 2015, 3:05 PM
#1
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

can't log in to admin

Hi,

I am currently unable to log into my client's admin and am getting the error below:

"**Warning: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in [path to store]/login.php on line 13"

**This error appears on the login screen but does show the log in form. When I enter my credentials and click login, however, just the error appears and I cannot access anything in admin.

As far as I'm aware no changes have been made to any of the php files (only I would have done that - my client does not know how to download or edit any php files). Does anyone have any idea why this would suddenly arise?

Thanks for any light anyone can shed on this.

Ellie Armsby

21 Dec 2015, 3:15 PM
#2
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: can't log in to admin

Doing a little digging I think maybe this is related to a change on the server in PHP version (?) I checked to see if maybe whatever issue is causing this error has been addressed in v. 1.5.4 but it looks like the line of code in question is the same for both version 1.5.2 and 1.5.4

define('ADMIN_PASSWORD_EXPIRES_INTERVAL', strtotime('- 90 day'));

Ellie Armsby

21 Dec 2015, 3:19 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: can't log in to admin

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Dec 2015, 3:55 PM
#4
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: can't log in to admin

Thanks. That was helpful. It didn't solve the problem, though, so off to contact the hosting company! :)

Ellie Armsby

21 Dec 2015, 4:04 PM
#5
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: can't log in to admin

Interesting. This same error occurs when I run a test php page with nothing but:

phpinfo();

Must be something on the host's end, I think.

Ellie Armsby

21 Dec 2015, 4:21 PM
#6
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: can't log in to admin

So, the hosting company "fixed" it by rolling back from PHP version 5.6 to version 5.4.4. They said "Our system automatically upgraded you to use php5.6, and your site wasn't ready for it, so I rolled it back"

Does this get sorted out in a higher level of ZenCart or should I keep the site on PHP 5.4.4 until a newer version of ZenCart comes out?

Ellie Armsby

21 Dec 2015, 10:25 PM
#7
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: can't log in to admin

if

phpinfo();

causes an error, i find it hard to imagine that there is a problem on the zen-cart side of things.

to me, it still sounds like a problem on the hosts side; despite what the hosting company may say.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

22 Dec 2015, 4:19 PM
#8
earmsby avatar

earmsby

Zen Follower

Join Date:
Oct 2006
Location:
Worcester, MA
Posts:
451
Plugin Contributions:
0

Re: can't log in to admin

Yes, that is the case. It had nothing to do with ZenCart but the version of PHP. The host rolled the client's site back to PHP 5.4.4 but I'm curious about that "solution" since ZenCart 1.5.4 purports to be compatible with PHP 5.6 even though the offending line in admin/login.php is the same for v. 1.5.1 and 1.5.4 - both have the line:

define('ADMIN_PASSWORD_EXPIRES_INTERVAL', strtotime('- 90 day'));

So the problem is solved for now but I'm wondering if it will recur once I upgrade the client's shop to ZC 1.5.4 and the host moves him to PHP 5.6.

Oh well, I guess it's solved for now and I'll worry about the other stuff later. :)

Ellie Armsby

22 Dec 2015, 7:14 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: can't log in to admin

So the "problem" revolves around designating a timezone for use by php... If the host does not have this setup already, then yes it will still be a "problem" in other ZC versions, but is something that is made easier to address in newer ZC versions.. Mind you v1.5.2 was never considered a production release version so upgrade to the latest version is advised. At the same time, v1.5.5 is expected to be released in the next week or so, with beta version available on github that will turn into the final version here shortly.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 Dec 2015, 7:53 PM
#10
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: can't log in to admin

if your host is running php 5.6, and you create a script that just has the phpinfo() line in it, and that does not work; then the problem is outside of zen-cart and whether any zen-cart version is compatible with any version of php.

in re-reading this thread, it seems that the problem could be solved with adding a date.timezone line into your local php.ini file. such as:

date.timezone = "US/Central"

if you do not have access to locally stored php.ini file, you can try adding the following code to includes/application_top.php

if( ! ini_get('date.timezone') )
{
    date_default_timezone_set('GMT');
}

you can track down your timezone here:

http://www.php.net/manual/en/timezones.php

you may also need to add it YOUR_ADMIN/includes/application_top.php

but again, this is a work-around if you do not have access to configure your own php.ini file. you can contact your host to see if you can make use of your locally stored php.ini file.

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.