Jump to content
sinopia

ezsocial login sessions problems

Recommended Posts

Hello

I've upgraded into 7.3 and seems to be all ok, I got a 2.3.4 template but I've been updating some code from CE-Phoenix some functions and code to be recent (a lot core modifications that would require a lot to upgrade all to CE-Phoenix)

But while login with facebook/google/etc with ezsocial login I'm getting this warnings:

Warning: session_set_save_handler(): Cannot change save handler when session is active in /home/x/public_html/includes/functions/sessions.php on line 65

Warning: session_name(): Cannot change session name when session is active in /home/x/public_html/includes/functions/sessions.php on line 142

Warning: session_save_path(): Cannot change save path when session is active in /home/x/public_html/includes/functions/sessions.php on line 167

Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /home/x/public_html/includes/application_top.php on line 172

Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "navigationHistory" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home/x/public_html/includes/application_top.php on line 348

The normal sessions like login/login seems to work fine and keeps the products etc. It's just while trying to login with facebook for example.

Should the files login_with_facebook.php missing application_top for the sessions part?

I've getting more warnings and errors like:

[29-Oct-2019 10:16:58 Europe/Lisbon] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /home/x/public_html/includes/functions/sessions.php on line 149
[29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning:  session_set_save_handler(): Cannot change save handler when session is active in /home/x/public_html/includes/functions/sessions.php on line 65
[29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning:  session_name(): Cannot change session name when session is active in /home/x/public_html/includes/functions/sessions.php on line 142
[29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning:  session_save_path(): Cannot change save path when session is active in /home/x/public_html/includes/functions/sessions.php on line 167
[29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning:  session_set_cookie_params(): Cannot change session cookie parameters when session is active in /home/x/public_html/includes/application_top.php on line 177
[29-Oct-2019 10:27:19 Europe/Lisbon] PHP Fatal error:  Uncaught Error: Call to undefined function mcrypt_get_block_size() in /home/x/public_html/oauth/functions.php:14
Stack trace:
#0 /home/x/public_html/login_with_facebook.php(113): mc_encrypt('ezsocial|262......', 'c8e0...........')
#1 {main}
  thrown in /home/x/public_html/oauth/functions.php on line 14

[29-Oct-2019 10:46:33 Europe/Lisbon] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106
[29-Oct-2019 10:46:38 Europe/Lisbon] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106
[29-Oct-2019 10:49:59 Europe/Lisbon] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106
[29-Oct-2019 10:50:03 Europe/Lisbon] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106

[29-Oct-2019 10:55:24 Europe/Lisbon] PHP Warning:  require(includes/languages/.php): failed to open stream: No such file or directory in /home/x/public_html/includes/application_top.php on line 334

Seems that mcrypt is deprecated since PHP 7.1.. and to use openssl instead, but it's also possible to use mcrypt it but not recommended. But should that been causing this issue with sessions?

Best regards

Share this post


Link to post
Share on other sites

Added require('includes/application_top.php'); and seems to fixed the sessions issues.. now I got:

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/x/public_html/includes/functions/compatibility.php:18) in /home/x/public_html/includes/functions/compatibility.php on line 29

Mine compatibility.php is the same as this: https://github.com/gburton/CE-Phoenix/blob/master/includes/functions/compatibility.php

I'll check if it's active on cPanel..

Another issue related with sessions.. at database I got 622940 records, it seems that is logging some session records.. Should it not removed as customers logout or the session expires?

Share this post


Link to post
Share on other sites

Seems that the files login_with_facebook.php and others had twice application_top.php requires.. Only requires if ($success), so disabled that and put it on the top, seems to fix it. Now got this:

Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /home/x/public_html/oauth/functions.php:14 Stack trace: #0 /home/x/public_html/login_with_facebook.php(113): mc_encrypt('ezsocial|262058...', 'c8e0c24452f4178...') #1 {main} thrown in /home/x/public_html/oauth/functions.php on line 14

Will try to change the functions from ezsocial to use openssl. As it's not a good idea to compile mcrypt as it's deprecated.

Share this post


Link to post
Share on other sites

Replace the function to use openssl_encrypt/decrypt instead of mcrypt and seems everything to work. If anyone need to substitute pm me.

Will check now if the warning about sessions keep showing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×