Forums / Bug Reports / [Done v1.5.5] Admin timezone error on login page

[Done v1.5.5] Admin timezone error on login page

Locked

Started by danielle on 11 Nov 2015, 6:55 PM · Views: 2,269

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Nov 2015, 6:55 PM
#1
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

[Done v1.5.5] Admin timezone error on login page

I have seen this exact issue posted in other threads, but none of the solutions have worked. This is a fresh install of v1.5.4. The server is running PHP 5.6.

This is the error when I try to access the admin page:

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 /home1/***/public_html/new/shopadmin/login.php on line 13

I have set the time zone in includes/extra_configures/set_time_zone.php, this is what is there now:

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'

I am also getting this error in the log files:

[11-Nov-2015 13:49:55 America/New_York] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home1//public_html/new/shopadmin/login.php:13) in /home1//public_html/new/includes/functions/sessions.php on line 115
[11-Nov-2015 13:49:55 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/l/public_html/new/shopadmin/login.php:13) in /home1//public_html/new/shopadmin/includes/init_includes/init_templates.php on line 28

I have checked the files referenced in the log file, but none of them have empty lines, spaces, etc.

I just don't know what else to try. The Zen-Cart server compatibility page says that v1.5.4 is compatible with PHP 5.5 and 5.6, but it seems there are issues with 5.6. I tried using 5.5 instead, but it's not installed on the server unfortunately.

Any suggestions on how I can fix this? Thanks!

Danielle

11 Nov 2015, 10:13 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.5.5] Admin timezone error on login page

Evidently it's a bug which only shows up when the hosting server has done nothing with timezone support at all.

The fix (which we'll put in the next version) is simple:

Edit /admin/login.php
Find line 16:```
require ('includes/application_top.php');

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

12 Nov 2015, 1:24 AM
#3
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: [Done v1.5.5] Admin timezone error on login page

That worked perfectly, thank you!

DrByte:

Evidently it's a bug which only shows up when the hosting server has done nothing with timezone support at all.

The fix (which we'll put in the next version) is simple:

Edit /admin/login.php
Find line 16:```
require ('includes/application_top.php');

Danielle

20 Nov 2015, 5:17 PM
#4
paws avatar

paws

New Zenner

Join Date:
Nov 2015
Location:
WA.
Posts:
1
Plugin Contributions:
0

Re: [Done v1.5.5] Admin timezone error on login page

I had the same problem.

This worked great.