I am using opencart 3.0.3.7 for about 2 weeks working on a website. I have logged in many times but after setting the time zone to America/New York I can no longer login. I just get the login screen with no errors. I changed the timezone to UTC in the database and I still cannot login.
There are no errors in my log files.
I changed the cookie code in system/framework.php and also in catalog/controller/startup/session.php which also didn't help.
I changed php.ini to add:
session.cookie_lifetime =360000
session.save_path =/tmp
I changed the admin login and password in the oc_user table. That also didn't help.
There are only a-z,0-9 chars in my user name and password.
Both cache and cookies have been cleared.
Same issue with a different browser.
How do I resolve this and get logged in again?
There are no errors in my log files.
I changed the cookie code in system/framework.php and also in catalog/controller/startup/session.php which also didn't help.
I changed php.ini to add:
session.cookie_lifetime =360000
session.save_path =/tmp
I changed the admin login and password in the oc_user table. That also didn't help.
There are only a-z,0-9 chars in my user name and password.
Both cache and cookies have been cleared.
Same issue with a different browser.
How do I resolve this and get logged in again?
See this solution about UTC: viewtopic.php?f=201&t=222369&start=20#p817086 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If you have tried both suggestions in viewtopic.php?f=201&t=222369&start=20#p816440. Or have tried changing session_engine to file in system/config/default.php. Clearing your browser cache before attempting to login each time.dcscott wrote: ↑Thu Apr 15, 2021 10:28 pmI am using opencart 3.0.3.7 for about 2 weeks working on a website. I have logged in many times but after setting the time zone to America/New York I can no longer login. I just get the login screen with no errors. I changed the timezone to UTC in the database and I still cannot login.
There are no errors in my log files.
I changed the cookie code in system/framework.php and also in catalog/controller/startup/session.php which also didn't help.
I changed php.ini to add:
session.cookie_lifetime =360000
session.save_path =/tmp
I changed the admin login and password in the oc_user table. That also didn't help.
There are only a-z,0-9 chars in my user name and password.
Both cache and cookies have been cleared.
Same issue with a different browser.
How do I resolve this and get logged in again?
Then it's probably some change you have made that is now locking you out. For example OpenCart doesn't like session.cookie_lifetime being set to a value other than zero.
I guess I should be more specific:
I tried all the things I mentioned and both of you mentioned.
The timezone IS set to UTC both in the database AND in system/config/default.php
Yes, after the settings made no difference, I set them back to default EXCEPT for leaving the timezone set to UTC.
Still not able to login.
I tried all the things I mentioned and both of you mentioned.
The timezone IS set to UTC both in the database AND in system/config/default.php
Yes, after the settings made no difference, I set them back to default EXCEPT for leaving the timezone set to UTC.
Still not able to login.
In your php.ini going by what you said. Don't set it or set it to 0. See. https://github.com/opencart/opencart/issues/8141
Have you tried with .user.ini instead of php.ini file?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'm back on.
Here is what I did:
I restored the site from backup then changed config_timezone to UTC.
It let me login.
When I logged off then back on, it did the same thing (wouldn't log me in).
But when I tried logging in again, I got in.
Note: I had done this previously and it didn't work. Because when I make changes and they don't work, I put things back to they way they were and move on to trying something else, the reason none of the other changes worked is because I reverted the config_timezone back to what it was when it didn't work the 1st time. And, yes I cleared the cache and cookies on each trial. Anyway, now I know to not accept the 1st attempt after any change I make.
Here is what I did:
I restored the site from backup then changed config_timezone to UTC.
It let me login.
When I logged off then back on, it did the same thing (wouldn't log me in).
But when I tried logging in again, I got in.
Note: I had done this previously and it didn't work. Because when I make changes and they don't work, I put things back to they way they were and move on to trying something else, the reason none of the other changes worked is because I reverted the config_timezone back to what it was when it didn't work the 1st time. And, yes I cleared the cache and cookies on each trial. Anyway, now I know to not accept the 1st attempt after any change I make.
dcscott wrote: ↑Fri Apr 16, 2021 9:40 pmI'm back on.
Here is what I did:
I restored the site from backup then changed config_timezone to UTC.
It let me login.
When I logged off then back on, it did the same thing (wouldn't log me in).
But when I tried logging in again, I got in.
Note: I had done this previously and it didn't work. Because when I make changes and they don't work, I put things back to they way they were and move on to trying something else, the reason none of the other changes worked is because I reverted the config_timezone back to what it was when it didn't work the 1st time. And, yes I cleared the cache and cookies on each trial. Anyway, now I know to not accept the 1st attempt after any change I make.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
An observation:
When the cookie has expired, it takes two attempts to re-login.
It is as if when there is no cookie, it is set then it is found on the subsequent login attempt.
If the code were to set the cookie then immediately requested, the second login attempt would be avoided.
When the cookie has expired, it takes two attempts to re-login.
It is as if when there is no cookie, it is set then it is found on the subsequent login attempt.
If the code were to set the cookie then immediately requested, the second login attempt would be avoided.
Who is online
Users browsing this forum: OSWorX and 415 guests