SOLVED: Magento keeps logging out from administration

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.

Share this:

23 thoughts on “SOLVED: Magento keeps logging out from administration

  1. Hello;
    but where should I modify this code??? Pleaz unswer to my question.

    Thank you in advance

  2. 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

  3. Hello Lukáš Gavenda ;
    Yes I did but i dont have suhoshin.ini, that’s why i add it in php.ini.

  4. 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] [2002] 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
    Stack trace:
    #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

  5. Yes I tried to, but what i noticed that the host changed the version of phpmyadmin, can that be a reason for this problem??

  6. It seems like if the website couldn’t connect the database but I dont know how to solve this problem;
    Eny Idea????
    Thank you in advance, and I’m very very sorry for disturbing you..

  7. hello;
    it seems that nothing happend; and I steel wait for help;

    I’m sorry for disturbing you, and than you so mutch.

  8. 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.

  9. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.