Comments (17)
I have a similar issue on final PHP 7.0 whereas I can overcome your issue with the directions mentioned in http://www.code007.ro/making-work-magento-with-php-7-rc1
But after patching this I always get a 502 Bad Gateway
through nginx.
from cm_redissession.
@craigcarnell I have tested saving sessions in database with PHP 7.0.0 and both: enabled and disabled Cm_RedisSession. The error is the same. According to my testing the error not related to Cm_RedisSession but rather to a bug with PHP 7.0.0.
@arosenhagen thanks for sharing the solution. It would be better to not rewriting the getData, setData, unsetData but having a fix for PHP but I cannot find any related open bug: https://bugs.php.net/search.php?cmd=display&search_for=session_regenerate_id&x=9&y=5.
from cm_redissession.
Yes just stumbled upon Inchoo/Inchoo_PHP7#4 which mentions a rather old bug from the RCs of PHP7 (https://bugs.php.net/bug.php?id=70520). This should indeed be a more "global" problem to either ZEND Framework or PHP7 itself.
from cm_redissession.
Hello all, I didn't had time to test Redis, but it seems that similar problem with Db session handler and php7 is that Mage_Core_Model_Resource_Session::read($sessId)
was returning false when called on session_regenerate_id(true), since there is no session at that point, and just casting return to string fixed the problem. Php5 was ok with false, php7 isn't.
And I was getting similar error with db session handler:
session_regenerate_id(): Failed to create(read) session ID: user (path: )
Can maybe someone check if it's the same problem? Just make sure string is always returned at
https://github.com/colinmollenhour/Cm_RedisSession/blob/master/code/Model/Session.php#L387
Regards
from cm_redissession.
I have applied the fix that resulted from: Inchoo/Inchoo_PHP7#4
The mysql database issue is fixed with that.
But now I have the same 502 Bad Gateway'
message that @arosenhagen had using the redis sessions. I have no idea where to start investigating that issue...
from cm_redissession.
I added the string casting, but in the normal case it should have already worked. The only case the string casting should matter is if the session data read was not able to be decoded for some reason..
Has anyone tried with no compression or with different compression algorithms?
from cm_redissession.
@colinmollenhour tested this also moments ago - the error is still there and it looks more like an issue with redis itself. now trying to test against very latest phpredis.
from cm_redissession.
What's the status of this thing?
from cm_redissession.
Based on 7.0.3 changelog it sounds like the session issues should be fixed. Anyone tested latest Cm_RedisSession with PHP 7.0.3?
from cm_redissession.
I tested this with 7.0.2 just today and the issues disappeared completely!
from cm_redissession.
@arosenhagen Saw that too, just waiting for it to be released. I might get around to compiling it
from cm_redissession.
@colinmollenhour Will test as soon as brew is updated to 7.0.3, hopefully soon
from cm_redissession.
just as a follow-up: we have RedisSessions running in production with 7.0.2 without hic-ups.
from cm_redissession.
I've been using 7.0.2 myself and have no had this issue. Thanks for the testing, everyone!
from cm_redissession.
Based on your comments above, I thought this issue should be resolved, but I am encountering it with the following server setup:
NGINX 1.10.1
PHP 7.0.12
Redis 3.2.4
Magento 1.9.2.4
I have also installed the PHP 7 extension from inchoo: https://github.com/Inchoo/Inchoo_PHP7
Here is the stacktrace:
Recoverable Error: session_regenerate_id(): Failed to create(read) session ID: memcache (path: tcp://127.0.0.1:11211?persistent=0&weight=2&timeout=60&retry_interval=10) in /home/dir/public_html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 492
0 [internal function]: mageCoreErrorHandler(4096, 'session_regener...', '/home/dir/p...', 492, Array)
1 /home/dir/public_html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(492): session_regenerate_id(true)
2 /home/dir/public_html/app/code/core/Mage/Core/Model/Session/Abstract.php(570): Mage_Core_Model_Session_Abstract_Varien->regenerateSessionId()
3 /home/dir/public_html/app/code/core/Mage/Admin/Model/Session.php(120): Mage_Core_Model_Session_Abstract->renewSession()
4 /home/dir/public_html/app/code/core/Mage/Admin/Model/Observer.php(77): Mage_Admin_Model_Session->login('user', 'password', Object(Mage_Core_Controller_Request_Http))
5 /home/dir/public_html/app/code/core/Mage/Core/Model/App.php(1358): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer))
6 /home/dir/public_html/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Admin_Model_Observer), 'actionPreDispat...', Object(Varien_Event_Observer))
7 /home/dir/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
8 /home/dir/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
9 /home/dir/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
10 /home/dir/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
11 /home/dir/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
12 /home/dir/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
13 /home/dir/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
14 /home/dir/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
15 /home/dir/public_html/index.php(82): Mage::run('domain_co', 'website')
16 {main}
Any ideas how to resolve this error? Thank you!
from cm_redissession.
Very first line shows that the error is related to memcache, not redis.
from cm_redissession.
Having this same problem on Magento Enterprise edition ... can't seem to find the corresponding 'read' function anywhere ...
from cm_redissession.
Related Issues (20)
- Connectivity issue with Azure Redis Cache HOT 1
- Configuration changes don't take effect HOT 3
- hard coded session expiry HOT 5
- Magento 1.7.0.2 and PHP 7.x HOT 1
- Fatal Error when compilation is enabled HOT 4
- Passing glue string after array is deprecated. Swap the parameters in colinmollenhour/credis/Client.php on line 1414 HOT 4
- Cm\RedisSession\Handler::read taking more than 6sec HOT 14
- Session storage - Too many active connections HOT 2
- Tag current version master HOT 1
- Magento 2 switching to Laminas instead of Zend (ZF2) HOT 3
- Experiencing delay problems HOT 1
- PHP Warning: Module 'redis' already loaded in Unknown on line 0 HOT 1
- Make setSaveHandler() only callable once
- Separate read-only instance from read/write instance HOT 5
- missing ConfigInterface HOT 1
- Session IDs are plain text in redis (missing hash) HOT 1
- Native Magento Redis Session extension HOT 1
- 3.0.1 can not load the session model using composer HOT 10
- How can I install a specific version of this module via modman? HOT 4
- Error cleaning cache by mode matchingAnyTag: A pipeline is already in use and only one pipeline is supported. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cm_redissession.