Post by karat » Sat Dec 24, 2016 1:21 pm

Hi,
I m using OpenCart 2.3.0.2 and when i am open my website first time of each day i got Error.

Fatal error: SessionHandler::create_sid(): Cannot call default session handler in Unknown on line 0

And if i do login first from admin area this message do not appear and the site is running well. But every day i got Error...

Theme i used : Domino 1.0
My Php Version : 5.6.27
Hosting Godaddy Linux Ultimate

Site : www.karatsquare.com

Is there any solution....

Thank you

Newbie

Posts

Joined
Sat Dec 24, 2016 1:01 pm

Post by littleredcar » Mon Oct 21, 2024 7:24 pm

SAME HERE!

OC 2.3.0.2
PHP 7.4 (and others)

any idea, anyone?

---
Environment
php: 7.4.33
Browser: Chrome latest

---
OpenCart
2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
DE language by OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)
Template: Sellmore by 321cart
quite a few Extensions :-)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by by mona » Mon Oct 21, 2024 7:49 pm


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ADD Creative » Mon Oct 21, 2024 10:01 pm

littleredcar wrote:
Mon Oct 21, 2024 7:24 pm
SAME HERE!

OC 2.3.0.2
PHP 7.4 (and others)

any idea, anyone?
The following topic may also be helpful.
viewtopic.php?t=167942

www.add-creative.co.uk


Guru Member

Posts

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

Post by littleredcar » Mon Oct 21, 2024 11:02 pm

ADD Creative wrote:
Mon Oct 21, 2024 10:01 pm
littleredcar wrote:
Mon Oct 21, 2024 7:24 pm
SAME HERE!

OC 2.3.0.2
PHP 7.4 (and others)

any idea, anyone?
The following topic may also be helpful.
viewtopic.php?t=167942
dont use vqmod
dont use Nitropack

---
Environment
php: 7.4.33
Browser: Chrome latest

---
OpenCart
2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
DE language by OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)
Template: Sellmore by 321cart
quite a few Extensions :-)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by littleredcar » Mon Oct 21, 2024 11:05 pm

by mona wrote:
Mon Oct 21, 2024 7:49 pm
Have you tried the fix?
https://github.com/opencart/opencart/issues/5088
actually YES, but after using this 'fix' it gets FAR WORSE! :-X

visitors can now access the shop again - BUT carts are getting shared between ALL VISITORS (worldwide) from now on!!
if someone in, say india puts one item in his cart, another visitor in canada can see this item hin HIS cart, too. and delete it or change quantity etc.

???

---
Environment
php: 7.4.33
Browser: Chrome latest

---
OpenCart
2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
DE language by OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)
Template: Sellmore by 321cart
quite a few Extensions :-)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by ADD Creative » Tue Oct 22, 2024 1:26 am

littleredcar wrote:
Mon Oct 21, 2024 11:05 pm
by mona wrote:
Mon Oct 21, 2024 7:49 pm
Have you tried the fix?
https://github.com/opencart/opencart/issues/5088
actually YES, but after using this 'fix' it gets FAR WORSE! :-X

visitors can now access the shop again - BUT carts are getting shared between ALL VISITORS (worldwide) from now on!!
if someone in, say india puts one item in his cart, another visitor in canada can see this item hin HIS cart, too. and delete it or change quantity etc.

???
That would happen if the session ID can't be created.

For PHP 7 and above you should be able to use.

Code: Select all

public function createId() {
	return bin2hex(random_bytes(13));
}
You probably still want to work out what causes the issue. When did it start and were there any changes made to your site. Gave you check your server and PHP error logs as well as the OpenCart one?
Last edited by ADD Creative on Tue Oct 22, 2024 4:06 pm, edited 1 time in total.

www.add-creative.co.uk


Guru Member

Posts

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

Post by littleredcar » Tue Oct 22, 2024 7:40 am

ADD Creative wrote:
Tue Oct 22, 2024 1:26 am

That would happen if the session ID can't be created.

For PHP 7 and above you should be able to use.

Code: Select all

public function createId() {
	return bin2hex(random_bytes(13);
}
You probably still want to work out what causes the issue. When did it start and were there any changes made to your site. Gave you check your server and PHP error logs as well as the OpenCart one?
nope, I now do get error 500 again.

EDIT:
looks much better with another ')' , though

so thanks - will check tomorrow morning if it still runs smoothly...

---
Environment
php: 7.4.33
Browser: Chrome latest

---
OpenCart
2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
DE language by OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)
Template: Sellmore by 321cart
quite a few Extensions :-)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by ADD Creative » Tue Oct 22, 2024 4:12 pm

littleredcar wrote:
Tue Oct 22, 2024 7:40 am
nope, I now do get error 500 again.

EDIT:
looks much better with another ')' , though

so thanks - will check tomorrow morning if it still runs smoothly...
Sorry I missed off a bracket. I've corrected the original post.

You probably still want to work out what causes the default session handler issue. When did it start and were there any changes made to your site? Have you check your server and PHP error logs as well as the OpenCart one? Are your using any caching or optimisation extensions?

www.add-creative.co.uk


Guru Member

Posts

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

Users browsing this forum: No registered users and 3 guests