Forums / Installing on a Linux/Unix Server / Error message when attempting to log in to the admin panel

Error message when attempting to log in to the admin panel

Views: 5,586

Results 1 to 14 of 14
10 Apr 2016, 7:49 PM
#1
dperkins avatar

dperkins

New Zenner

Join Date:
Apr 2016
Location:
Frederick, Maryland, USA
Posts:
4
Plugin Contributions:
0

Error message when attempting to log in to the admin panel

I originally downloaded and installed ZenCart on my server in 2013. Not updated since. I was sick for a LONG time and I am now back to attempting to get things going again. I don't know the version for sure. Where do I find it? My site's PHP version is 5.5.29

When I go to the URL to log in to my admin page for setting up my cart, I find the message below, above the box where I would enter my username and password.

Warning: strtotime(): Invalid date.timezone value 'EDT', we selected the timezone 'UTC' for now. in /home/thecraze/www/www/cart/admin/login.php on line 13

When I go to that address in my control panel, I do not find ANYTHING that relates to timezones.

Yes, my username and password work... and AFTER I submit my username and password, I get that same message at the top of the page and nothing else.

I have cleared the cookies on Firefox (I am using the latest version of Firefox)

Looks to me like ZenCart is not acknowledging my password.

My cart can be found at: https://www.thecrazedcollector.com/cart

What am I doing wrong or what needs to be done to remedy this challenge?

HELP Please!

David Perkins - [email protected]

10 Apr 2016, 8:47 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Error message when attempting to log in to the admin panel

David, a Zen Cart installed in 2013 is most likely running Zen Cart 1.5.1. You can check the file /includes/version.php to see for sure.

To correct most of the timezone-related issue (there's also some change required to the database interface, but I'm not sure how down-version-portable that is), you can use the code that was introduced in Zen Cart 1.5.2.

Create the file /includes/extra_configures/set_time_zone.php that contains:

<?php
/**
 * @package initSystem
 * @copyright Copyright 2003-2013 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
 */
/*
 * Set time zone
*/
if (version_compare(PHP_VERSION, 5.3, '>='))
{
  // put your timezone here. Refer to http://www.php.net/manual/en/timezones.php
  $TZ = 'America/New_York';  // eg: 'Europe/Oslo'



  /**
   * MAKE NO CHANGES BELOW THIS LINE
   *
   * The following will take the timezone you specified above and apply it in your store.
   * If you didn't specify one, it will try to use the setting from your server's PHP configuration
   */
  if ($TZ == 'America/New_York') {
    $TZ = date_default_timezone_get();
  }
  if ($TZ != '') {
    putenv('TZ=' . $TZ);
    @date_default_timezone_set($TZ);
  }
}

and then add the file /YOUR_ADMIN/includes/extra_configures/use_catalog_time_zone.php that contains:

<?php
/**
 * @package admin
 * @copyright Copyright 2003-2013 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Sat Nov 2 01:21:28 2013 -0400 New in v1.5.2 $
 */
// get time zone settings from catalog-side file
include (DIR_FS_CATALOG . '/includes/extra_configures/set_time_zone.php');
10 Apr 2016, 9:04 PM
#3
dperkins avatar

dperkins

New Zenner

Join Date:
Apr 2016
Location:
Frederick, Maryland, USA
Posts:
4
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

Lat9,

Thanks so much! Success at last. Correct on version # it is 1.5.1

Your add-in's did the trick.

Your help is Greatly Appreciated.

David

10 Apr 2016, 10:10 PM
#4
dperkins avatar

dperkins

New Zenner

Join Date:
Apr 2016
Location:
Frederick, Maryland, USA
Posts:
4
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

Oh shucks,

I thought things were all well and once the admin page timed out, I get this message at the top of the screen, above where I'm to log in...

Warning: strtotime(): Invalid date.timezone value 'EDT', we selected the timezone 'UTC' for now. in /home/thecraze/www/www/cart/5802/login.php on line 13

Will updating to a more current version help or is something more cinister at work here?

11 Apr 2016, 1:40 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Error message when attempting to log in to the admin panel

Updating to the current version (Zen Cart 1.5.5) will certainly help; what you're experiencing is a software incompatibility between your site's PHP version and your Zen Cart version.

11 Apr 2016, 11:12 PM
#6
dperkins avatar

dperkins

New Zenner

Join Date:
Apr 2016
Location:
Frederick, Maryland, USA
Posts:
4
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

Thanks again. I'll take the dare and update.

I'm hoping that updating is as easy as updating my wordpress blog is...

Any tips before i begin?

12 Apr 2016, 12:46 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Error message when attempting to log in to the admin panel

dPerkins:

Thanks again. I'll take the dare and update.

I'm hoping that updating is as easy as updating my wordpress blog is...

Any tips before i begin?
It probably won't be that easy, but for a lightly-customized Zen Cart installation the upgrade shouldn't be too bad.

12 Apr 2016, 2:25 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Error message when attempting to log in to the admin panel

dPerkins:

Thanks again. I'll take the dare and update.

I'm hoping that updating is as easy as updating my wordpress blog is...

Any tips before i begin?

Out the gate? Backup the database and files before beginning the upgrade/rebuild.

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

12 Apr 2016, 3:20 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Error message when attempting to log in to the admin panel

dPerkins:

Warning: strtotime(): Invalid date.timezone value 'EDT', we selected the timezone 'UTC' for now. in /home/thecraze/www/www/cart/5802/login.php on line 13Just a note: 'EDT' is not the style of timezone that PHP recognizes.

On the Admin login page, especially prior to v1.5.5, you'll be seeing messages about timezone errors because Zen Cart's time-zone stuff hasn't kicked in prior to loading the login form (that was fixed in v155) ... and thus the errors you see are related to your server's PHP configuration, as set by your hosting company.

Your hosting company should be using something like 'America/New_York' instead of EDT in their master php.ini configuration of the server.
(Although many would argue that the hosting company should always set it to UTC, and let individual sites choose their own timezone. But that's another issue beyond the scope of this discussion.)

.
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.

7 May 2016, 2:21 AM
#10
portraitartist avatar

portraitartist

New Zenner

Join Date:
Mar 2006
Posts:
86
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

Hi, I have the same problem., I cannot log into my admin in one of my site.
I uploaded the two files in this thread to my website, but it did not worked.
I am using ZenCart 1.5.0 and PHP 5.6.2 and MySQL 5.5.45-cll-lve
I am running this ZenCart version since it come out, I think last year.
I did the official upgrade procedure.

Here is the error message I got:
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 'America/New_York' for 'EDT/-4.0/DST' instead in /home/vod/public_html/CART/ADMIN/login.php on line 13

Can you help me figure out the solution?
Thank you
https://www.vodmochka.com

Our New Zen cart: https://www.EmbroideryPortraits.com/Gifts/
https://www.vodmochka.com/Embroidery_Designs
All critics and suggestions are welcome!

7 May 2016, 3:08 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Error message when attempting to log in to the admin panel

PortraitArtist:

Hi, I have the same problem., I cannot log into my admin in one of my site.
I uploaded the two files in this thread to my website, but it did not worked.
I am using ZenCart 1.5.0 and PHP 5.6.2 and MySQL 5.5.45-cll-lve
I am running this ZenCart version since it come out, I think last year.
I did the official upgrade procedure.

Here is the error message I got:
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 'America/New_York' for 'EDT/-4.0/DST' instead in /home/vod/public_html/CART/ADMIN/login.php on line 13

Can you help me figure out the solution?
Thank you
www.vodmochka.com
Best solution, as I pointed out above, is to upgrade to the latest version of Zen Cart: v1.5.5a, released yesterday. If you're using v1.5.0, that was released in 2011.

If you promise you'll start putting plans in place now to upgrade, then I'll give you a tip to get you by temporarily on this issue: move the line about application_top up from line 16 to line 9, as shown here: https://github.com/zencart/zencart/commit/7020d20cdf196251cb79e927e91dbf6ff23aae1d

.
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.

9 May 2016, 12:42 AM
#12
portraitartist avatar

portraitartist

New Zenner

Join Date:
Mar 2006
Posts:
86
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

Hi DrByte,
Thank you for the help.
Fortunately my website host changed the settings on their server and I can get in the admin area.
I will update to the newest version of Zen Cart ASAP.
I was waiting for the new flex template and now I am waiting for my host to transfer our websites to a faster, cloud based server.
Thanks again.

Our New Zen cart: https://www.EmbroideryPortraits.com/Gifts/
https://www.vodmochka.com/Embroidery_Designs
All critics and suggestions are welcome!

9 May 2016, 4:32 AM
#13
portraitartist avatar

portraitartist

New Zenner

Join Date:
Mar 2006
Posts:
86
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

DrByte,
I confirmed that my webhost transferred our sites to a cloud based server.
Now I can update Zen Cart to the new version that I think will take a few days with the new template.
I can change the PHP version up to 7.0 and many other things through cPanel.
Right now the setting is 5.3.

I would like to know if I should change the PHP version before I install the new version of Zen Cart, or after I installed it and made the changes to the template and other things.
I am afraid the current version of Zen Cart 1.5.0 will not work properly if I change it before I install the new one.
Please advise me about the proper procedure, or point me to any literature that explains this.
Thank you

Our New Zen cart: https://www.EmbroideryPortraits.com/Gifts/
https://www.vodmochka.com/Embroidery_Designs
All critics and suggestions are welcome!

9 May 2016, 4:43 AM
#14
portraitartist avatar

portraitartist

New Zenner

Join Date:
Mar 2006
Posts:
86
Plugin Contributions:
0

Re: Error message when attempting to log in to the admin panel

DrByte,
I find the answer in another post.
I will install the new Zen Cart with the current version of PHP and will switch to 7.0 once the new one is working properly.
I will open a new post for the best setting in cPanel.
Thank you.

Our New Zen cart: https://www.EmbroideryPortraits.com/Gifts/
https://www.vodmochka.com/Embroidery_Designs
All critics and suggestions are welcome!