Post by tjee0512 » Mon Jun 05, 2023 8:54 pm

Hi guys,

I have been trying to search for solutions online for the past 2 weeks but none of it works so far, or that I applied it wrongly. I have an Opencart store v3.0.3.2 https://shinepharmacy.com and the customer login isn't working recently, from my google chrome dev tool network tab, it shows that each customer login were successful, but it just redirect back to account/login after that. It's highly likely a session issue but I've tried a few methods online but it doesn't work so far. Anyone help will be very much appreciated!

Attachments

Capture.PNG

Capture.PNG (12.15 KiB) Viewed 661 times


Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by ADD Creative » Mon Jun 05, 2023 11:04 pm

Your OCSESSID cookie has a expiry date in the past. Check the PHP setting session.cookie_lifetime is 0.

https://github.com/opencart/opencart/issues/8141

www.add-creative.co.uk


Expert Member

Posts

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

Post by tjee0512 » Tue Jun 06, 2023 10:39 am

I've tried the above method and I don't know why it still doesn't change the expiry date of the OCSESSID, admin login is working fine though.

Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by SohBH » Tue Jun 06, 2023 7:40 pm

To troubleshoot the customer login redirect issue, I recommend trying to temporarily disable Cloudflare / caching feature and see if it resolves the problem. Cloudflare sometimes introduces additional caching and security measures that can interfere with the login functionality on your website.

Business Web Development | Content Creation | Analytics and Reporting | SEO


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by ADD Creative » Tue Jun 06, 2023 10:13 pm

Use phpinfo() to check the PHP session.cookie_lifetime setting in both the home and admin directories.

www.add-creative.co.uk


Expert Member

Posts

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

Post by tjee0512 » Wed Jun 07, 2023 2:05 pm

SohBH wrote:
Tue Jun 06, 2023 7:40 pm
To troubleshoot the customer login redirect issue, I recommend trying to temporarily disable Cloudflare / caching feature and see if it resolves the problem. Cloudflare sometimes introduces additional caching and security measures that can interfere with the login functionality on your website.
Hi Soh, thanks for the help, I've tried disabling Cloudflare caching and also paused Cloudflare from the site entirely, but it didn't help in this case.

Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by tjee0512 » Wed Jun 07, 2023 2:06 pm

ADD Creative wrote:
Tue Jun 06, 2023 10:13 pm
Use phpinfo() to check the PHP session.cookie_lifetime setting in both the home and admin directories.
Hi ADD Creative, the session.cookie_lifetime shows 360000

Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by ADD Creative » Wed Jun 07, 2023 4:04 pm

You need to set session.cookie_lifetime to 0 for OpenCart 3.0.x. You may have to ask your host where you can change the PHP settings.

www.add-creative.co.uk


Expert Member

Posts

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

Post by tjee0512 » Thu Jun 08, 2023 12:18 pm

ADD Creative wrote:
Wed Jun 07, 2023 4:04 pm
You need to set session.cookie_lifetime to 0 for OpenCart 3.0.x. You may have to ask your host where you can change the PHP settings.
I've tried changing session.cookie_lifetime from 360000 to 0 in etc/php/7.0/apache2/php.ini but in phpinfo it still shows 360000, any possible reason why?

Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by tjee0512 » Thu Jun 08, 2023 12:27 pm

Nevermind I got it, simply because I did not restart the server after the change :-\ .

Anyway thanks guys, the problem is solved now!

Newbie

Posts

Joined
Mon Nov 03, 2014 6:12 pm

Post by JNeuhoff » Thu Jun 08, 2023 5:08 pm

tjee0512 wrote:
Thu Jun 08, 2023 12:27 pm
Nevermind I got it, simply because I did not restart the server after the change :-\ .

Anyway thanks guys, the problem is solved now!
Glad to hear you managed to sort it out. Can you please add '[SOLVED]' to the beginning of the opening forum thread title? Thanks.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 264 guests