Post by sergiomng » Tue May 12, 2020 11:49 am

I'm using OpenCart 3.0.3 and for some reason, I cannot login to the admin panel. When I enter my username & password the page displayed is the same login page and the URL changes (https://myDomain.com/admin/index.php?ro ... pCZJHj8Qff)

If I type an invalid username/password an alert is displayed (incorrect username/pwd)

This is actually the same problem from another post: viewtopic.php?t=186267 however, the solutions provided there didn't work for me, and those were to change the pwd using only letters and numbers (no special characters) which I did, and the other suggestion was to edit the system/framework.php file, and substitute the setcookie code with the one provided there, which I also did.

These are the only posts that I've found with the same problem I'm having, but none of them were useful in my case, so now I'm kind of lost.

By the way, I've installed this OpenCart about 2 years ago, I've never had a problem logging in the admin panel, but all of the sudden I'm not being able to do so.

Any help will be really appreciated.

Newbie

Posts

Joined
Fri Mar 29, 2019 3:32 am

Post by paulfeakins » Tue May 12, 2020 6:53 pm

sergiomng wrote:
Tue May 12, 2020 11:49 am
These are the only posts that I've found with the same problem I'm having, but none of them were useful in my case, so now I'm kind of lost.
You could have told us what things you've seen and tried so we don't repeat those solutions?

Anyway, I suspect it's disk full on your web hosting?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by sergiomng » Wed May 13, 2020 4:44 am

Thank you for your reply paulfeakins.

I did mention that I've tried the solution provided here: viewtopic.php?t=186267 and also tried changing the password so it only contains numbers and letters and none of those solutions worked for me.

I've also checked if the .htaccess file has changed, but it's still the same since one year ago.

About my disk space, although it's sort of full, I believe there's still space:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      111G   83G   23G  79% /
tmpfs                 4.2G     0  4.2G   0% /dev/shm
/dev/sda1             500M  133M  341M  28% /boot
/usr/tmpDSK           2.3G   77M  2.1G   4% /tmp
I also tried to look for any log files, but the error.log and openbay.log files are empty. I guess logging is not activated, and right now I'm looking for a way to activate it.

Newbie

Posts

Joined
Fri Mar 29, 2019 3:32 am

Post by ADD Creative » Wed May 13, 2020 6:12 am

This doesn't look right in your URL, route=/language/en-gb/extension/dashboard. It should be route=common/dashboard or the URL you tried to access before login. Do you have any redirects in you htaccess that could affect this?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by sergiomng » Wed May 13, 2020 8:05 am

This is the actual URL, for some reason it was copied wrong

Code: Select all

https://MYDOMAIN/admin/index.php?route=common/dashboard&user_token=XJxCBbxD0qQPDx29hTVaDlO1UraQ98VX

Newbie

Posts

Joined
Fri Mar 29, 2019 3:32 am

Post by sergiomng » Wed May 13, 2020 8:17 am

And about the .htaccess file, this is what I have. As I mentioned before the file hasn't changed and last week I was able to enter into the admin panel.

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com




Header add Access-Control-Allow-Origin "*"

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes


# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*) https://itlogic.mx%{REQUEST_URI} [R=301,L,NE]
RewriteBase /

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


Newbie

Posts

Joined
Fri Mar 29, 2019 3:32 am

Post by sergiomng » Wed May 13, 2020 1:59 pm

I finally solved it!!!

In case someone faces this problem, there's table called oc_session, which SHOULD have a primary key but it doesn't, since the session_id should not be duplicated.
I just delete all contents (truncate oc_session) and created a primary key index for session_id, and voilá!!!

Why it worked just fine for more than a year, I don't know, but now it's working like a charm.

Newbie

Posts

Joined
Fri Mar 29, 2019 3:32 am

Post by paulfeakins » Wed May 13, 2020 6:29 pm

sergiomng wrote:
Wed May 13, 2020 1:59 pm
I just delete all contents (truncate oc_session) and created a primary key index for session_id, and voilá!!!
Good solution, marking [SOLVED]

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by jacles@hotmail.com » Mon Feb 08, 2021 1:45 pm

hello
i had the same problem
i try this: viewtopic.php?p=680870#p680870 but no work form me
y have this in oc_sesion table:
session_id,data,expire
181bf3bcc695e203e849566564,false,2021-02-08 01:01:33


Posts

Joined
Mon Feb 01, 2021 3:54 am

Post by sw!tch » Mon Feb 08, 2021 2:12 pm

jacles@hotmail.com wrote:
Mon Feb 08, 2021 1:45 pm
hello
i had the same problem
i try this: viewtopic.php?p=680870#p680870 but no work form me
y have this in oc_sesion table:
session_id,data,expire
181bf3bcc695e203e849566564,false,2021-02-08 01:01:33
OC version, PHP version?

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 jacles@hotmail.com » Tue Feb 09, 2021 8:04 am

sw!tch wrote:
Mon Feb 08, 2021 2:12 pm
jacles@hotmail.com wrote:
Mon Feb 08, 2021 1:45 pm
hello
i had the same problem
i try this: viewtopic.php?p=680870#p680870 but no work form me
y have this in oc_sesion table:
session_id,data,expire
181bf3bcc695e203e849566564,false,2021-02-08 01:01:33
OC version, PHP version?
opencart-3.0.3.7
PHP 7.3
Gracias


Posts

Joined
Mon Feb 01, 2021 3:54 am

Post by sw!tch » Tue Feb 09, 2021 8:20 am

jacles@hotmail.com wrote:
Tue Feb 09, 2021 8:04 am
opencart-3.0.3.7

Did you mess with the timezone settings in the admin?

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 yegary » Wed Feb 10, 2021 1:24 pm

Hi, I have the same problem today, just did the fresh installation of 3.0.3.7, after update the store setting, can't go back in again, I did change to my timezone, will this cause the problem? thanks.

Newbie

Posts

Joined
Fri Apr 18, 2014 7:42 am

Post by sw!tch » Wed Feb 10, 2021 1:47 pm

yegary wrote:
Wed Feb 10, 2021 1:24 pm
Hi, I have the same problem today, just did the fresh installation of 3.0.3.7, after update the store setting, can't go back in again, I did change to my timezone, will this cause the problem? thanks.
Yeah it appears to be a bug in 3.0.3.7. - See this thread. - viewtopic.php?f=201&t=222369

Also advise you report it on OC GitHub, so it can be fixed from the core.
https://github.com/opencart/opencart/issues/9237

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 yegary » Wed Feb 10, 2021 2:05 pm

thanks for the reply. any temp solution at the mean time? I check the thread. - viewtopic.php?f=201&t=222369 you posted but doesn't seem to work for me.

Newbie

Posts

Joined
Fri Apr 18, 2014 7:42 am

Post by sw!tch » Wed Feb 10, 2021 2:23 pm

yegary wrote:
Wed Feb 10, 2021 2:05 pm
thanks for the reply. any temp solution at the mean time? I check the thread. - viewtopic.php?f=201&t=222369 you posted but doesn't seem to work for me.
I haven't spent much time on 3.0.3.7 to look into it, but if you want to try the below feel free at your own risk.

In phpmyadmin go to your oc_setting table and under the key column look for config_timezone, you can try setting the value back to UTC

Once you do that try logging in. Keep it set to UTC until the bug is resolved.

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 yegary » Wed Feb 10, 2021 3:06 pm

Hi, already tried to change back to UTC , still having the same problem. :-[

Newbie

Posts

Joined
Fri Apr 18, 2014 7:42 am

Post by sw!tch » Wed Feb 10, 2021 3:29 pm

yegary wrote:
Wed Feb 10, 2021 3:06 pm
Hi, already tried to change back to UTC , still having the same problem. :-[
Clear your bowser cookies and try again.

You sure you set it back to UTC?
Any error message when trying to login?

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 yegary » Sun Feb 14, 2021 9:41 am

it was my browser issue, thanks again.

Newbie

Posts

Joined
Fri Apr 18, 2014 7:42 am

Post by makako1970 » Mon Feb 15, 2021 12:43 pm

sw!tch wrote:
Wed Feb 10, 2021 2:23 pm
yegary wrote:
Wed Feb 10, 2021 2:05 pm
thanks for the reply. any temp solution at the mean time? I check the thread. - viewtopic.php?f=201&t=222369 you posted but doesn't seem to work for me.
I haven't spent much time on 3.0.3.7 to look into it, but if you want to try the below feel free at your own risk.

In phpmyadmin go to your oc_setting table and under the key column look for config_timezone, you can try setting the value back to UTC

Once you do that try logging in. Keep it set to UTC until the bug is resolved.
Thank you man!!! The first time it happened I did a complete reinstall thinking it was something I screwed up... the second time I thought strange characters in user admin did it... finally... I got your solution simple and very effective solution...
oc_setting table and under the key column look for config_timezone: setting the value back to UTC
It worked like a charm for me at least... crazy...
THANK YOU THANK YOU THANK YOU!!! 8)

Newbie

Posts

Joined
Mon Feb 01, 2021 5:34 am
Who is online

Users browsing this forum: sidclel and 87 guests