Magento Forum

Page 2 of 2
cannot log in in the admin dashboard
 
yesvinnie
Jr. Member
 
Total Posts:  22
Joined:  2009-08-06
 

What if it’s not localhost? I am getting the same problem on a hosted site. Also, the problem does not occur when I use a Windows XP machine. I just got a Windows 7 Starter edition netbook. And it’s only happening on that.

Please help. The above solution looks great but won’t help me.

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
Richard Feraro
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2009-02-12
Manila
 
yesvinnie - 05 May 2010 07:38 AM

What if it’s not localhost? I am getting the same problem on a hosted site. Also, the problem does not occur when I use a Windows XP machine. I just got a Windows 7 Starter edition netbook. And it’s only happening on that.

Please help. The above solution looks great but won’t help me.

Thanks in advance

Are you using XAMPP in your local setup?

 
Magento Community Magento Community
Magento Community
Magento Community
 
yesvinnie
Jr. Member
 
Total Posts:  22
Joined:  2009-08-06
 

I should have been clearer. I am using a web browser to access my sites on the hosting service servers somewhere else in the country. When I use the browsers on my windows XP machines to access them I do not have a problem logging in. But, when I use my new Windows 7 machine I cannot log in at all.

I thought it was a cookie problem so I checked the browser options/settings. They are fine, I even added to allow the cookies from my sites. Also, I checked my security software. It is fine too. Basically all the cookies from other sites are set properly except from my hosted site. The cookie is lost immediately after being set, I cannot figure out why. Not sure if it has anything to do with being on a shared-server.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Richard Feraro
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2009-02-12
Manila
 
yesvinnie - 10 May 2010 04:07 AM

I should have been clearer. I am using a web browser to access my sites on the hosting service servers somewhere else in the country. When I use the browsers on my windows XP machines to access them I do not have a problem logging in. But, when I use my new Windows 7 machine I cannot log in at all.

I thought it was a cookie problem so I checked the browser options/settings. They are fine, I even added to allow the cookies from my sites. Also, I checked my security software. It is fine too. Basically all the cookies from other sites are set properly except from my hosted site. The cookie is lost immediately after being set, I cannot figure out why. Not sure if it has anything to do with being on a shared-server.

Thanks

How about your SSL certificates? Is it valid or self-signed? Did you enable the use secure login in the frontend?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jenagan
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2012-04-27
Vancouver, BC
 

Edit in Varien.php file ( Path: app\\code\\core\\Mage\\Core\\Model\\Session\\Abstract ) the following. In session cookie params

// session cookie params
        $cookieParams = array(
            
'lifetime' => $cookie->getLifetime(),
            
'path'     => $cookie->getPath(),
            
'domain'   => null,
            
'secure'   => null,
            
'httponly' => null
        
);

or comments them. ( // )
It works for me too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sunilshah2711
Jr. Member
 
Total Posts:  1
Joined:  2012-11-03
 

The Issue is, Most browsers won’t accept cookies from a localhost, and that is the only issue you are having.

To solve the issue do the following changes in Varien.php. The path for Varien.php isapp/code/core/Mage/Core/Model/Session/Abstract.

Find the code below in Varien.php file, started on line 96

if (isset($cookieParams[’domain’])) {

Replace above code with following :

if (isset($cookieParams[’domain’]) && !in_array("127.0.0.1", self::getValidatorData())) {

Source : http://dumpnshare.irfanansari.com/magento/administrator-login-failed-after-sucessfull-magento-installation-on-localhost/

 
Magento Community Magento Community
Magento Community
Magento Community
 
nassehk
Jr. Member
 
Total Posts:  3
Joined:  2013-10-22
 

When I am trying to login I receive this long list errors. It happened right after installing Flagbit extension. Any Idea how to fix it.

Trace:
#0 D:\xampp\htdocs\magento\app\Mage.php(222): Mage::throwException(’Mage registry k...’)
#1 D:\xampp\htdocs\magento\app\Mage.php(476): Mage::register(’_singleton/flag...’, false)
#2 D:\xampp\htdocs\magento\includes\src\__default.php(21330): Mage::getSingleton(’flagbit_changea...’)
#3 D:\xampp\htdocs\magento\app\Mage.php(447): Mage_Core_Model_App->dispatchEvent(’adminhtml_block...’, Array)
#4 D:\xampp\htdocs\magento\includes\src\Mage_Adminhtml_Block_Template.php(80): Mage::dispatchEvent(’adminhtml_block...’, Array)
#5 D:\xampp\htdocs\magento\includes\src\__default.php(2541): Mage_Adminhtml_Block_Template->_toHtml()
#6 D:\xampp\htdocs\magento\includes\src\Mage_Adminhtml_Block_Dashboard_Diagrams.php(55): Mage_Core_Block_Abstract->toHtml()
#7 D:\xampp\htdocs\magento\includes\src\__default.php(1916): Mage_Adminhtml_Block_Dashboard_Diagrams->_prepareLayout()
#8 D:\xampp\htdocs\magento\includes\src\__default.php(27605): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#9 D:\xampp\htdocs\magento\includes\src\Mage_Adminhtml_Block_Dashboard.php(66): Mage_Core_Model_Layout->createBlock(’adminhtml/dashb...’)
#10 D:\xampp\htdocs\magento\includes\src\__default.php(1916): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#11 D:\xampp\htdocs\magento\includes\src\__default.php(27605): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 D:\xampp\htdocs\magento\includes\src\__default.php(27621): Mage_Core_Model_Layout->createBlock(’adminhtml/dashb...’, ‘dashboard’)
#13 D:\xampp\htdocs\magento\includes\src\__default.php(27388): Mage_Core_Model_Layout->addBlock(’adminhtml/dashb...’, ‘dashboard’)
#14 D:\xampp\htdocs\magento\includes\src\__default.php(27354): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#15 D:\xampp\htdocs\magento\includes\src\__default.php(27359): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#16 D:\xampp\htdocs\magento\includes\src\__default.php(13798): Mage_Core_Model_Layout->generateBlocks()
#17 D:\xampp\htdocs\magento\includes\src\__default.php(13723): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#18 D:\xampp\htdocs\magento\includes\src\Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#19 D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\controllers\DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#20 D:\xampp\htdocs\magento\includes\src\__default.php(13872): Mage_Adminhtml_DashboardController->indexAction()
#21 D:\xampp\htdocs\magento\includes\src\__default.php(18234): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#22 D:\xampp\htdocs\magento\includes\src\__default.php(17768): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 D:\xampp\htdocs\magento\includes\src\__default.php(20368): Mage_Core_Controller_Varien_Front->dispatch()
#24 D:\xampp\htdocs\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#25 D:\xampp\htdocs\magento\index.php(87): Mage::run(’’, ‘store’)
#26 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
TheBigLaskowski
Jr. Member
 
Total Posts:  6
Joined:  2010-05-11
 
ArmandoR - 13 January 2010 12:27 PM

You may want to try commenting out session cookies.

Most browsers won’t accept cookies from a localhost, and that is the issue you are having.

To comment out session cookies, you’ll need to navigate to Varien.php. The path is app/code/core/Mage/Core/Model/Session/Abstract.

Find the code for setting session cookie parameters. In my copy of the Varien.php file, these started on line 77. Here is the specific code for which you’re looking:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()


Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()

You can see a video about doing this at http://www.ecommercedeveloper.com/articles/1419-Tutorial-Avoid-Two-Problems-Installing-Magento-On-A-Localhost

Worked Perfect !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jase007
Guru
 
Total Posts:  388
Joined:  2013-11-05
 

Hi,

Check this thread http://www.dangibbs.co.uk/journal/magento-admin-dashboard-login-not-working-locally

Hope this will help you!!

Thanks

iLoveMage

 
Magento Community Magento Community
Magento Community
Magento Community
 
nesomis
Jr. Member
 
Total Posts:  4
Joined:  2013-04-28
 
ArmandoR - 13 January 2010 12:27 PM

You may want to try commenting out session cookies.

Most browsers won’t accept cookies from a localhost, and that is the issue you are having.

To comment out session cookies, you’ll need to navigate to Varien.php. The path is app/code/core/Mage/Core/Model/Session/Abstract.

Find the code for setting session cookie parameters. In my copy of the Varien.php file, these started on line 77. Here is the specific code for which you’re looking:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()


Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()

You can see a video about doing this at http://www.ecommercedeveloper.com/articles/1419-Tutorial-Avoid-Two-Problems-Installing-Magento-On-A-Localhost

This sollution works for me. Thanks a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Daedana
Jr. Member
 
Total Posts:  2
Joined:  2013-12-03
 

I got mine to work on my mac by commenting the line-’localhost 127.0.0.1’ from /etc/hosts using pico on the command line. And then rebooting to clear the cache.

I would however like to know why Magento still suggest localhost as a choice there during installation. I do not understand this and would really appreciate an answer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
howlongtheroad
Jr. Member
 
Total Posts:  4
Joined:  2012-06-03
 

i not comment any line,just delete cache in /var/cache/*,that work for me.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2