Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Can’t login to admin after installation. 
 
robk
Jr. Member
 
Total Posts:  7
Joined:  2008-12-26
 
JasonLee - 03 June 2009 10:26 AM

snowball - 01 June 2009 04:46 AM
But when you use MAMP on Mac OSX, you better use Safari, cause FF redirects http://127.0.0.1 to http://localhost ...

My FireFox (v3.0.6) does not redirect 127.0.0.1 to localhost.

My Firefox (v3.0.11) did, and i didn’t really like idea of hacking too much code, especially what I didn’t understand, even though I’m using a localhost with WAMP anyway.

What I did was open the file app/etc/config.xml and change on or about line 287 in my magento v1.3.2.2
from

<host>localhost</host>
to
<host>127.0.0.1</host>
and now even if I use http://localhost/magento/index.php/admin in my address bar, it will even redirect to http://127.0.0.1/magento/index.php/admin/… and all seems to be “normal” from there

Now I suppose that if I am going to install on WAMP next time, I will make sure to make the base url “127.0.0.1” instead of the default “localhost” and I think I would be better off (to be tested but confidence is high)
I think that localhost is still host for the database, though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mahmud03
Jr. Member
 
Total Posts:  5
Joined:  2009-07-27
 

I am using wamp server and firefox. I installed the latest version of magento in localhost but could not log into admin panel.
After long hours of trying and waiting, at last I have successfully logged into admin panel.
so far I have found that the database name in the file app/etc/config.xml always remain as “magento” whatever the database name I put while installing. I just changed the database name from ‘magento” to “magentotest” [ magentotest was my database name].

 
Magento Community Magento Community
Magento Community
Magento Community
 
moomoo
Sr. Member
 
Avatar
Total Posts:  192
Joined:  2009-07-10
 

This worked for me:

UPDATE `core_config_dataSET `value` = 'http://127.0.0.1/' WHERE `config_id` =3 LIMIT 1 ;
UPDATE `core_config_dataSET `value` = 'http://127.0.0.1/' WHERE `config_id` =4 LIMIT 1 ;
UPDATE `core_config_dataSET `value` = '127.0.0.1' WHERE `config_id` =191 LIMIT 1 ;

The 3rd line is the extra bit compared to previous advice, and sets the cookie domain. I think the advice to comment out the core lines just stops the cookie domain check, where this will set it correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NaturalPestProducts
Jr. Member
 
Total Posts:  5
Joined:  2009-06-15
 


I have been reading all of the responses about not being able to access the dashboard. I am having the same problem. This is my first time using Magento. Am I suppose to install Magento on my local drive rather than with my hosting company? I can’t even get started using the software. I can access the cPanel.

Here is the info from my cPanel:

Main Domain: naturalpestproduc
tsstore.com
Username: naturba4
Home Directory: /home5/naturba4
Last login from 24.131.175.35
Shared Ip Address 66.147.242.182

I have tried almost every variation of paths and not luck. Is Magento this difficult to work with?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Raptor Commerce (Matt)
Member
 
Total Posts:  49
Joined:  2009-08-10
 

Please see this thread:

http://www.magentocommerce.com/boards/viewthread/49440/

Magento sets the domain when setting cookies and 127.0.0.1 and localhost aren’t valid domains according to several RFCs. Simple solution is to create an entry in your hosts file and map a ‘proper’ domain to localhost e.g.

127.0.0.1    localhost    www.localhost.com

You’ll also need to update your magento db e.g.

update core_config_data set value 'http://www.localhost.com/magento' 
where path in ('web/secure/base_url''web/unsecure/base_url');

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mr. Handley
Jr. Member
 
Total Posts:  3
Joined:  2009-07-27
 

I am having the exact same behavior when trying to access the admin panel with IE8 running 1.3.2 at my host, Siteground. (LAMP) Firefox works like a champ, but when trying to login with IE8, with correct user and pass, I simply end up back at the login screen with no error message, exactly as the people in this thread with localhost failed attempts.  Any pointers?  Cookies enabled in IE8.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Umbre
Jr. Member
 
Total Posts:  2
Joined:  2009-06-12
 
Mr. Handley - 19 August 2009 02:50 AM

I am having the exact same behavior when trying to access the admin panel with IE8 running 1.3.2 at my host, Siteground. (LAMP) Firefox works like a champ, but when trying to login with IE8, with correct user and pass, I simply end up back at the login screen with no error message, exactly as the people in this thread with localhost failed attempts.  Any pointers?  Cookies enabled in IE8.

I have the same error ... Nobody have a response?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bashar
Jr. Member
 
Total Posts:  1
Joined:  2008-04-07
 

I’ve recently tried the installer using MAMP and also can’t login using Firefox and Safari. I tried new fresh browser, the suggested hosts solution, and the code commenting suggestion as well, but it still gave me errors. Have I forgot the password? Maybe but I doubt, and since I don’t have local mail server I can’t email the password to my self without one. Quickest solution just to get things going on development local machine is to auto-authenticate. Simply open file User.php under app/code/core/Mage/Admin/Model.

Go to method authenticate, and replace the code

public function authenticate($username, $password)
{
$result = false;
try {

with

public function authenticate($username, $password)
{
$result = true; // Make it true authentication by default
try {

Try to login with dummy password, then go to System, account and change your password again. Set $result back to false.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sushi
Jr. Member
 
Total Posts:  3
Joined:  2009-08-30
 
johnh - 29 May 2009 11:49 PM

-Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code,

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);

-Replace above code by,

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

-Save it and try to login to your magento admin panel.


if u only comment the lines instead of replacing text take a good look at commas !!!!!

This worked. Thanks a LOT man. I can’t thank you enough. This has just saved me a hosting I’d have bought just to try out Magento since I wasn’t able to try it using WAMP on Windows 7.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jdesign
Jr. Member
 
Total Posts:  3
Joined:  2009-09-24
 
sushi - 31 August 2009 04:38 AM

johnh - 29 May 2009 11:49 PM
-Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code,

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);

-Replace above code by,

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

-Save it and try to login to your magento admin panel.


if u only comment the lines instead of replacing text take a good look at commas !!!!!

This worked. Thanks a LOT man. I can’t thank you enough. This has just saved me a hosting I’d have bought just to try out Magento since I wasn’t able to try it using WAMP on Windows 7.

Yeah this worked for me too. Thanks heaps! grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
furqan
Jr. Member
 
Total Posts:  12
Joined:  2008-05-27
 

I was also facing the same issue as all faced with the new version of the mangento but thank you so much now it has been resolved as you mentioned the solution in the thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JulianM
Jr. Member
 
Total Posts:  9
Joined:  2008-05-28
 

Hi…

Quick solution if you still cannot access Magento even if you use http://127.0.0.1/magento

- Go to <magento_path>/var and remove session and cache directories.
- Remove your cookies ( I have Web developer toolbar and it is easier with it, but you can clear your browser’s cache as well).

Try again and good luck.

Julian
FPPT.info | http://www.free-power-point-templates.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
zeflavio
Jr. Member
 
Total Posts:  1
Joined:  2009-07-27
 

I’m using my PC to test Magento. I’m using wamp 2.0f and have installed magento 1.3.2.4 (clean install) and I can’t login to the admin page.

I changed the code
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
);

and it worked just fine.

Thanks for the instruction

 
Magento Community Magento Community
Magento Community
Magento Community
 
inzition
Jr. Member
 
Total Posts:  13
Joined:  2009-02-03
 

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

Worked for me on Mac MAMP

 
Magento Community Magento Community
Magento Community
Magento Community
 
nelamurugan
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2009-01-15
Chennai
 

Hi all,

In case if your local magento installation wont allow you through admin means just remove these three lines from your magento directory.

{basedir}magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()

or you can try your local ip to login.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top