Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 1.9.4 session error with PHP 7.2 #1127

Closed
himanshutecstub opened this issue Jul 28, 2020 · 3 comments
Closed

Magento 1.9.4 session error with PHP 7.2 #1127

himanshutecstub opened this issue Jul 28, 2020 · 3 comments

Comments

@himanshutecstub
Copy link

himanshutecstub commented Jul 28, 2020

Summary
Use magento 1.9.4.2 which is working fine with PHP 7.0 and MySql 5.6 with Cm_RedisSession
Now upgrade PHP version to 7.2.31 and MySql 5.7 with same code. It's slow down and got many session error as below (Redis Version : 6.0.5) and in website shown Out of memory error.

Examples
PHP Fatal error: Uncaught Error: __clone method called on non-object in /app/code/core/Mage/Core/Model/Session/Abstract.php:214
Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in Unknown on line 0
Warning: Cannot use a scalar value as an array in /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 446
Warning: Cannot use a scalar value as an array in /lib/Varien/Object.php on line 270

Also use latest Cm_Cache_Backend_Redis version for redis cache and also try to set zend.enable_gc = On.
How resolve that problem. is there any other settings required?

@seansan
Copy link
Contributor

seansan commented Sep 3, 2020

We are still seeing this error

2020-09-02T20:02:13+00:00 ERR (3): Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
2020-09-02T20:02:13+00:00 ERR (3): Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /tmp) in Unknown on line 0

/tmp has rights drwxrwxrwt

To move forward on this

  • could we better log the location "where" this goes wrong?
  • can we improve logging to know "what" cannot be written?

At least then we are moving forward to identyfing a fix

Must be some config ... but we dont know which config

#156

https://stackoverflow.com/questions/34117651/php7-symfony-2-8-failed-to-write-session-data
zendframework/zend-session#77
laminas/laminas-session#6
https://stackoverflow.com/questions/46676474/warning-unknown-failed-to-write-session-data-using-user-defined-save-handler

@seansan
Copy link
Contributor

seansan commented Sep 3, 2020

Maybe add "Failed to write session data using user defined save handler" the error to the title

@seansan
Copy link
Contributor

seansan commented Sep 7, 2020

See #906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants