Post by Esron » Thu Jan 27, 2022 9:35 pm

Hi Friends,
I'm new to opencart and I'm using Opencart Version 3.0.3.8 . I have Successfully Setup the Installation after that i have also created a user account to login and it can also be seen in open cart customer section.While trying to login it redirects to the same login page account/login and i also tried solutions mentioned in viewtopic.php?t=202589 but that also seem to create an another error of too many redirection .Please Help me Solve the problem.

Newbie

Posts

Joined
Thu Jan 27, 2022 9:17 pm

Post by ADD Creative » Fri Jan 28, 2022 12:16 am

What theme and extensions/modifications are you using? What PHP version? Any errors in the OpenCart error log? Any errors in the PHP error log? Any errors in your web browser's developer console?

www.add-creative.co.uk


Expert Member

Posts

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

Post by paulfeakins » Fri Jan 28, 2022 12:20 am

What's in your .htaccess file?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Esron » Fri Jan 28, 2022 11:49 am

My php version is 7.4 . I installed a theme from template monster but still using default theme. No errors in any of the logs.My website link is glorybiblecenter.store .My info of ht access file is # 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

Options +FollowSymlinks

# Prevent Directory 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/

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]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

Newbie

Posts

Joined
Thu Jan 27, 2022 9:17 pm

Post by ADD Creative » Fri Jan 28, 2022 5:24 pm

Your OCSESSID session cookie has an expires date in the past. See https://github.com/opencart/opencart/issues/8141. Make sure session.cookie_lifetime is set to 0 in your PHP settings. Use phpinfo() to check.

www.add-creative.co.uk


Expert Member

Posts

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

Post by paulfeakins » Fri Jan 28, 2022 8:17 pm

Remember to use code blocks like this:

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

Options +FollowSymlinks

# Prevent Directory 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/

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]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by paulfeakins » Fri Jan 28, 2022 8:18 pm

ADD Creative wrote:
Fri Jan 28, 2022 5:24 pm
Your OCSESSID session cookie has an expires date in the past. See https://github.com/opencart/opencart/issues/8141. Make sure session.cookie_lifetime is set to 0 in your PHP settings. Use phpinfo() to check.
Ah yes, could be this one, good spot ADD.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by opencarthelpme » Thu Mar 10, 2022 4:50 pm

Hello. What was the solution for this issue?

I have the same problem here. Fresh installation, opencart 3.0.3.8 with php 7.4.26
On localhost works as expected but not when placed at my hosting supplier.
Checked and I do have the session session.cookie_lifetime set to zero (default value actually).
Any information is welcome.
Thank you


Posts

Joined
Thu Mar 10, 2022 5:56 am

Post by ADD Creative » Thu Mar 10, 2022 5:34 pm

opencarthelpme wrote:
Thu Mar 10, 2022 4:50 pm
Hello. What was the solution for this issue?

I have the same problem here. Fresh installation, opencart 3.0.3.8 with php 7.4.26
On localhost works as expected but not when placed at my hosting supplier.
Checked and I do have the session session.cookie_lifetime set to zero (default value actually).
Any information is welcome.
Thank you
Post a link to your site if you can or use the web browser developer tool to check your cookies.

www.add-creative.co.uk


Expert Member

Posts

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

Post by opencarthelpme » Thu Mar 10, 2022 6:52 pm

Thank you for the reply.
The cookie appear after the login that seems correct. Still is like the user is not logged on.

Attachments

opencart.png

opencart.png (23.23 KiB) Viewed 210 times



Posts

Joined
Thu Mar 10, 2022 5:56 am

Post by opencarthelpme » Thu Mar 10, 2022 7:39 pm

On my case problem was found. It was caused by a DHL integration.
Thank you


Posts

Joined
Thu Mar 10, 2022 5:56 am

Post by ocjimmy » Tue Apr 19, 2022 4:08 am

I encountered the same issue. It happened right after setting the time zone.

This topic covers the issue:
viewtopic.php?f=201&t=222369#p813699

Newbie

Posts

Joined
Thu Oct 15, 2020 8:48 pm

Post by ocjimmy » Tue Apr 19, 2022 6:19 am

Hello,

I encountered a similar issue after installing a fresh copy of 3.0.3.8. The customer login worked initially but somewhere along the way it stopped working. I spent hours troubleshooting the issue and finally created a new installation and started going through changes step by step. When I changed the timezone in System, Settings, Edit Store, Local Tab, Time Zone to America/Chicago is when the customer login started to behave exactly as you describe.

Here are two related topics that provide more details.
viewtopic.php?f=201&t=225942
viewtopic.php?f=201&t=222369&p=830270#p830270

Setting the timezone back to UTC solves the immediate problem. But if you are locked out of the admin then you may need to change that in the database using phpmyadmin.

I did the following to get things to work using the correct timezone:

In system/config/default.php, change the timezone to whatever timezone you want
$_['date_timezone'] = 'America/Chicago';

Then go into the admin and change the timezone in local settings from UTC to your desired timezone.

At one point, I made the following two changes and thought this was a fix at one point. But I was able to change them back to 'db' and things are still working.
// change the session from db to file in system/config/default.php
$_['session_engine'] = 'file';

// In system/config/catalog.php, change
$_['session_engine'] = 'file';

Hope this helps.

Newbie

Posts

Joined
Thu Oct 15, 2020 8:48 pm
Who is online

Users browsing this forum: No registered users and 25 guests