I just spent couple of hours by finding out, why is my Magento administration logging me out after moving my Magento store to new server. I found many hacks, modification and setup tips on the Google, but anything helped to me.This caused also dysfunction of the part of the administration, like image upload or switching among different parts of the Magento administration. Solution in my case was quiet easy, but hard to find:
I am using Suhosin php extension and I had to change one of the config values from:
suhosin.session.encrypt = On
suhosin.session.encrypt = Off
This solved my whole problem with sessions. Hope it helps to you too.
23 thoughts on “SOLVED: Magento keeps logging out from administration”
but where should I modify this code??? Pleaz unswer to my question.
Thank you in advance
On my server is the path to suhoshin config:
I am running Debian.
Hi Lukáš Gavenda;
I added that code in my php.ini but nothing happens, it keep logging out from the admin !! and I dont have possibility to change code of server’s files, so what can I do??
Do you have an auther solution??
Pleaz help me, I am bloqued I cant update my site’s products nather interface…
Thank you in advance
Did you read my comment? 😀
You are not adding this into php.ini, but into suhoshin.ini … check my previous comment again.
Hello Lukáš Gavenda ;
Yes I did but i dont have suhoshin.ini, that’s why i add it in php.ini.
Pleaz If you have an auther solution help me with, I am blocked
Did you check error logs? Is anything there?
Yes there is some but I dont know how to fixe it!!
Me either, if I do not know, what error you have there 🙂
This what I found in my error_log file:
[18-Mar-2011 11:45:02] PHP Parse error: syntax error, unexpected T_STRING in /home/pcdorma/public_html/app/code/core/Mage/Newsletter/Model/Template.php on line 348
[01-Apr-2011 17:15:41] PHP Fatal error: Uncaught exception ‘Zend_Db_Adapter_Exception’ with message ‘SQLSTATE[HY000]  Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (11)’ in /home/pcdorma/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:143
#0 /home/pcdorma/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(211): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/pcdorma/public_html/lib/Zend/Db/Adapter/Abstract.php(441): Varien_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/pcdorma/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(‘SET NAMES utf8’, Array)
#3 /home/pcdorma/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(281): Zend_Db_Adapter_Pdo_Abstract->query(‘SET NAMES utf8’, Array)
#4 /home/pcdorma/public_html/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query(‘SET NAMES utf8’)
#5 /home/pcdorma/public_html/app/code/core/Mage/Core/Model/Resource.php(87): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(M in /home/pcdorma/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 143
Maybe corrupted files and incorrect database connection info in magento config I guess. That log tells you everything, just read it 🙂
Yes I tried to, but what i noticed that the host changed the version of phpmyadmin, can that be a reason for this problem??
It seems like if the website couldn’t connect the database but I dont know how to solve this problem;
Thank you in advance, and I’m very very sorry for disturbing you..
Try this: http://goo.gl/JLu3c
it seems that nothing happend; and I steel wait for help;
I’m sorry for disturbing you, and than you so mutch.
Maybe some misconfiguration of sessions? Try check magento forums, there is couple of threads solving different issues of logging out from magento admin.
Than try different solutions listed on magento forums, there is a lot of them.
I have read some excellent stuff here. Certainly price bookmarking for revisiting. I surprise how a lot effort you place to create any such excellent informative site.
Fantastic submit, very informative. I’m wondering why the other experts of this sector don’t understand this. You should proceed your writing. I’m confident, you’ve a huge readers’ base already!|What’s Going down i am new to this, I stumbled upon this I have found It absolutely useful and it has helped me out loads. I’m hoping to contribute & aid other customers like its helped me. Great job.
Thank you for Your post, I will try come up with more stuff here …
Having read this I thought it was rather informative.
I appreciate you taking the time and energy to put this information together.
I once again find myself spending a lot of time both reading and leaving comments.
But so what, it was still worthwhile!