Hi all,
I inherited a Magento store that was running so far. I recently tried to log in into the backend and after I clicked on login, I received an error. Does anyone know this error or can help?
I don't know if something changed and if so what changed. I am pretty sure nobody did something on the shop itself, what I can't say with certainty is, that nobody changed something on the server as it is hosted externally and maybe they upgraded the php version or mySQL or ... I don't know.
Many thanks in advance for any advice.
Benni
That is the message:
Warning: Header may not contain NUL bytes in /home/suissetp/public_html/webshop/app/code/core/Mage/Admin/Model/Session.php on line 105 #0 [internal function]: mageCoreErrorHandler(2, 'Header may not ...', '/home/suissetp/...', 105, Array) #1 /home/suissetp/public_html/webshop/app/code/core/Mage/Admin/Model/Session.php(105): header('Location: http:...') #2 /home/suissetp/public_html/webshop/app/code/core/Mage/Admin/Model/Observer.php(69): Mage_Admin_Model_Session->login('admin', 'xxxx', Object(Mage_Core_Controller_Request_Http)) #3 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(1338): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer)) #4 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Admin_Model_Observer), 'actionPreDispat...', Object(Varien_Event_Observer)) #5 /home/suissetp/public_html/webshop/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array) #6 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Controller/Varien/Action.php(528): Mage::dispatchEvent('controller_acti...', Array) #7 /home/suissetp/public_html/webshop/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch() #8 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Controller/Varien/Action.php(408): Mage_Adminhtml_Controller_Action->preDispatch() #9 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index') #10 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #11 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() #12 /home/suissetp/public_html/webshop/app/Mage.php(683): Mage_Core_Model_App->run(Array) #13 /home/suissetp/public_html/webshop/index.php(88): Mage::run('', 'store') #14 {main}
Strange, what version are running? Has there been done any customizations done on the core files?
#0 [internal function]: mageCoreErrorHandler(2, 'Header may not ...', '/home/suissetp/...', 105, Array) #1 /home/suissetp/public_html/webshop/app/code/core/Mage/Admin/Model/Session.php(105): header('Location: http:...') #2 /home/suissetp/public_html/webshop/app/code/core/Mage/Admin/Model/Observer.php(69): Mage_Admin_Model_Session->login('admin', 'xxxx', Object(Mage_Core_Controller_Request_Http))
app/code/core/Mage/Admin/Model/Session.php(105): header()
This does not seem to be a standart Magento call.
Dear Jsiefer,
Thank you for your quick reply. I know, that customizations has been done, but as far as I know only as "extensions" but not to the core.
I am running Version 1.7.0.2 and because of those mentioned customizations that I don't know exactly I am affraid updating it.
In the meanwhile I tested different things and figured out, that it might be a corrupt session? When I open a new IE in private it is working. While I tried to reindex I got the Error:
#0 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /home/suissetp/public_html/webshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(313): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect() #3 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array) #4 /home/suissetp/public_html/webshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array) #5 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8') #6 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element)) #7 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup') #8 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup') #9 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates() #10 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules() #11 /home/suissetp/public_html/webshop/app/Mage.php(683): Mage_Core_Model_App->run(Array) #12 /home/suissetp/public_html/webshop/index.php(88): Mage::run('', 'store') #13 {main}
And after that I had a problem opening either frontend or backend. Another weired error appeared, same stack trace different Error:
SQLSTATE[HY000] [2002] No such file or directory #0 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /home/suissetp/public_html/webshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(313): Zend_Db_Adapter_Pdo_Mysql->_connect() #2 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect() #3 /home/suissetp/public_html/webshop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array) #4 /home/suissetp/public_html/webshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array) #5 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8') #6 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element)) #7 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup') #8 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup') #9 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates() #10 /home/suissetp/public_html/webshop/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules() #11 /home/suissetp/public_html/webshop/app/Mage.php(683): Mage_Core_Model_App->run(Array) #12 /home/suissetp/public_html/webshop/index.php(88): Mage::run('', 'store') #13 {main}
If it is just because the corupt session file I could live with the error and restarting a new browser in private moder everytime an error occurs. But my fears are, that one day our customers cannot order anymore.
That's why I would be interested in a solution anyhow.
Thanks in advance Benni
The second problem you mention really looks like PHP - MySQL setup issue.
Are you sure that it is just session based (the seocnd one).
If it continues, try using a simple php file that only connects to your database and if you can reproduce the probem check with your provider for help maybe....
Regarding the frist issue, check the file bellow I just checkd version 1.7 and the code exist.
It looks like they done some changes in version 1.9.
Maybe you can steal some of those changes manually from and update that file for the time beeing.
http://svn.magentocommerce.com/source/branches/1.9/app/code/core/Mage/Admin/Model/Session.php
Though Magento has been doing some security patches lately.
Dear jsiefer,
thanks for your help. Actually it is working, what is not good! If it is working, there is no preassure to fix it sustainable.
I'll keep an eye on it and try to make the connection to the db file to be sure if db connection is working,
Thanks Benni