Post by franklinveaux » Fri Feb 26, 2021 12:12 pm

gabosom wrote:
Wed Jul 26, 2017 9:34 pm
hi everyone,

I installed OpenCart 3.0.2.0 on https://infinityfree.net/ and went through the install process like a charm, no errors or anything. However, when I try to login to the admin panel I see an incredibly odd behavior - it never logs in when I use the correct credentials!

This is the behavior I see:

* If I use an incorrect username/password I get an error (which is correct)
* If I use the correct username/password this is what I see:
** I get redirected again to the login page
** I see a user token as a query parameter in the URL
** In the sessions table in the database, I see two different entries getting created every time I try to login with the correct credentials:
*** One only contains "false"
*** The other contains the actual token I see in my URI
** The active session ID in my cookie is using the ID for the one set to "false" in the database even though it has the token for the other one
* I don't see any errors anywhere

I tried enabling errors by adding these to my php.ini
error_reporting = E_ALL
display_errors = 1;

I haven't fiddled with the .htaccess at all since I'm not familiar with what changes I'd need to do.

I'm not sure if this is a hosting config issue or an problem with OpenCart.


Any ideas on how to move forward or what I can do to troubleshoot?
This bug still exists in 3.0.3.7. I just encountered it on a brand-new install on a VPS. I can replicate this problem 100% of the time with a few simple steps:

1. Install OpenCart.
2. Log on with your administrator password.
3. Go to the store settings.
4. Change the system time from the default to America/Los Angeles.

Boom! Done. You'll get the login page and from that point on, you will never be able to log in again. Typing a correct administrator username and password fails silently and takes you back to the login screen.

Every single time.

Newbie

Posts

Joined
Tue Feb 21, 2017 12:42 pm

Post by sw!tch » Fri Feb 26, 2021 2:02 pm

franklinveaux wrote:
Fri Feb 26, 2021 12:12 pm
This bug still exists in 3.0.3.7. I just encountered it on a brand-new install on a VPS. I can replicate this problem 100% of the time with a few simple steps:
Timezone setting was added in 3.0.3.7.

If on 3.0.3.7 - See the post below and read the part in bold. It's a temporary workaround until something official is released.

viewtopic.php?f=201&t=222369#p813699

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by ga239577 » Wed Mar 10, 2021 11:19 am

The cause of this for me was definitely changing the time zone in Open Cart settings. Temporary solution was to change line 15 of framework.php in the system folder.

The line before:

Code: Select all

date_default_timezone_set($config->get('date_timezone'));
The line after:

Code: Select all

date_default_timezone_set('America/Chicago');

Newbie

Posts

Joined
Sat Mar 06, 2021 1:17 pm

Post by sw!tch » Wed Mar 10, 2021 1:46 pm

ga239577 wrote:
Wed Mar 10, 2021 11:19 am
The cause of this for me was definitely changing the time zone in Open Cart settings. Temporary solution was to change line 15 of framework.php in the system folder.

The line before:

Code: Select all

date_default_timezone_set($config->get('date_timezone'));
The line after:

Code: Select all

date_default_timezone_set('America/Chicago');
You can also set it from system/config/default.php - https://github.com/opencart/opencart/bl ... lt.php#L14

Just keep in mind your store settings timezone will also need to match that.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by bluebrad » Thu Oct 14, 2021 2:33 am

Same problem on OC 3.0.3.8
after updating some of the sites info and my user NAME only it will not let me log back in
i tried reinstalling and just updating my name from john doe to my name and the same thing
so i desided to just leave it and after i updated the business info ... bam the same problem loged out and cant log in
no errors or logs

New member

Posts

Joined
Tue Dec 05, 2017 2:49 pm


Post by siptec » Fri Feb 04, 2022 2:16 am

Fixed my issue... I had the same experience 3.0.3.8. I changed the time zone and boom couldn't get in the admin.
ga239577 wrote:
Wed Mar 10, 2021 11:19 am
The cause of this for me was definitely changing the time zone in Open Cart settings. Temporary solution was to change line 15 of framework.php in the system folder.

The line before:

Code: Select all

date_default_timezone_set($config->get('date_timezone'));
The line after:

Code: Select all

date_default_timezone_set('America/Chicago');

User avatar
New member

Posts

Joined
Mon Sep 17, 2012 11:32 pm
Who is online

Users browsing this forum: Amazon [Bot] and 130 guests