Magento Forum

   
Can’t login to admin after installation! Please help! 
 
viralm7
Jr. Member
 
Total Posts:  1
Joined:  2009-07-13
 

After installation on localhost with apache server I am unable to login to admin area. tried to change password using md5 through phpmyadmin but still I can not login. Without admin login the software cannot be used. A good software without proper support will be lost in this competitive business of software.

 
Magento Community Magento Community
Magento Community
Magento Community
 
clockworkgeek
Sr. Member
 
Avatar
Total Posts:  79
Joined:  2009-07-31
 

I would like to add my experience with this same problem. For me it was because I was using localhost and admin needs to have dots in the hostname.

I altered the /app/etc/config.xml file to change the host from “localhost” to “127.0.0.1” then deleted all files within /var/cache.

That was it! Even when logging in with the url http://localhost/index.php/install it automatically redirects to 127.0.0.1 for me. This is quicker than reinstalling completely.

 
Magento Community Magento Community
Magento Community
Magento Community
 
edwardtilbury
Member
 
Total Posts:  66
Joined:  2008-08-01
Las Vegas, Nevada
 

So I figured I should give Magento a third try…

Today I downloaded 1.4 alpha 1… You would think by 1.4 Magento would have it’s act together… WRONG..

I can’t even LOGIN!!!

Word press = no problem
zencart = no problem
OSC = no problem
vbulletin = no problem
phpbb = no problem

but MAGENTO doesn’t allow you to have a site on localhost… #@($@(&@(??!??!?!

Who needs to login to their admin control panel… How silly… Do they even test this stuff…

Forget it..

I figured out a fix…

Download Zencart 1.3.8 and a ton of add ons.. 

Maybe I’ll try it again when 2.5 is out..

 
Magento Community Magento Community
Magento Community
Magento Community
 
sirbuck
Jr. Member
 
Total Posts:  5
Joined:  2008-12-16
 
figaronymous - 29 April 2009 05:12 AM

Found a solution to this issue.  The problem has to do with the short lifetime (just 1 hour—3600 seconds) Magento assigns to cookies by default.  If your local PC’s time is more than 1 timezone ahead of your server’s time, your browser will interpret the cookie as already expired as soon as it’s written.  For some reason Firefox can work around this issue, but Chrome can’t.

If you’re able to log into admin via Firefox, go to System > Configuration > Web > Session Cookie Management, and change the Cookie Lifetime to 86400 (1 day) instead of 3600 (1 hour).

If you’re unable to log into admin even when using Firefox, it’s possible to make this change directly in the mysql database.  In phpMyAdmin or similar DB admin tool, run this SQL command:

update core_config_data set value=86400 where path=’web/cookie/cookie_lifetime’

Thanks this worked perfectly!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jingpe
Jr. Member
 
Total Posts:  13
Joined:  2009-08-27
 

I just installed magento, and access by ip 192.168.xx.xx
after installation, i can’t access to the admin by safari 4. (mac)

and then i tried Firefox . works fine!!..

no wonder if there is a browser compatibility problem… (i tried to install magento before on a domain xxxxxxxx.com and was fine to access from safari )

 
Magento Community Magento Community
Magento Community
Magento Community
 
eric_su
Jr. Member
 
Total Posts:  1
Joined:  2008-05-16
 

modify the core Magento code (keep in mind you may have to re-apply the fix if you update the code Magento code) - go to: app/code/core/Mage/Core/Model/Session/Abstract and open up varien.php, and comment out lines 73 (comment out the comma at the end of the line) through 76 so that it looks like the following:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath() //remove this after putting on server (leave the comma) ,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

Also you can try the follow methods instead:
1) you can reference your admin page by using http://127.0.0.1 (this way it has periods in the host name) instead of localhost or

2) if you are on windows xp, add a host record in your hosts file by going to: C:\WINDOWS\system32\drivers\etc and have 127.0.0.1 point to something like magento.localhost

 
Magento Community Magento Community
Magento Community
Magento Community
 
erictr1ck
Member
 
Total Posts:  56
Joined:  2009-02-12
 

this did it for me:

http://www.magentocommerce.com/boards/viewthread/30715/P75/#t102062

 
Magento Community Magento Community
Magento Community
Magento Community
 
pkiriakou
Jr. Member
 
Total Posts:  8
Joined:  2009-10-19
 
eric_su - 10 September 2009 04:46 PM

modify the core Magento code (keep in mind you may have to re-apply the fix if you update the code Magento code) - go to: app/code/core/Mage/Core/Model/Session/Abstract and open up varien.php, and comment out lines 73 (comment out the comma at the end of the line) through 76 so that it looks like the following:

// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath() //remove this after putting on server (leave the comma) ,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);

I tried everthing else, but didnt work…

This worked perfect!!

P.S. (be careful with the comma...)

 
Magento Community Magento Community
Magento Community
Magento Community
 
enoc22
Jr. Member
 
Total Posts:  14
Joined:  2009-01-03
 

I was having trouble with this as well. I could log on with firefox but not with chrome or IE, tried several dif. computers. My fix was going into the database and to the core_config_data and making the “web/cookie/cookie_domain” field blank. Don’t know if that will hurt anything else but it’s letting me login now

Just my two bits

Oliver

 
Magento Community Magento Community
Magento Community
Magento Community
 
PaulBurns
Jr. Member
 
Total Posts:  3
Joined:  2009-09-22
 

I had the same issue until I tried something other than localhost or 127.0.0.1 in the address bar. Since i’m just testing, I setup a rule in my hosts file and this resolved the issue.

Hope that helps someone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inspirit
Jr. Member
 
Total Posts:  2
Joined:  2009-12-07
 
osamashahine - 11 February 2009 12:21 AM

snaveltje - 08 February 2009 07:35 AM
Just a minute after posting my previous post I solved the problem.
Normally all my webpages work fine with http://suse/webpages, but with the admin-page I need to refer to the IP-adress.
Instead of surfing to http://suse/magento/index.php/admin/ just go to http://192.168.16.3/magento/index.php/admin/ and it works.
(Of course use your IP-adress)

Hopefully some are helped with this suggestion.

Nuki.

it works fine with and solve the problem, so if you work on local host you need to put 127.0.0.1 then the admin password will works fine.
many thanks

Works wonderfully! Thank you.

Note for other users: Make sure you put in 127.0.0.1 in during your install basename or else all of the links will still reference localhost and not work in the admin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WarPet
Jr. Member
 
Total Posts:  1
Joined:  2010-01-04
 

For me it worked by just changing the development domain from magento to magento.com.loc. Probably browsers do not allows set-cookie header with [domain=magento;] which means 1-level domain name.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

Update (For Magento 1.4.*)

In Magento 1.4, you have to comment code from line 86 to 98 in app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Like this:-

/*  if (!$cookieParams['httponly']) {
    unset($cookieParams['httponly']);
    if (!$cookieParams['secure']) {
        unset($cookieParams['secure']);
        if (!$cookieParams['domain']) {
            unset($cookieParams['domain']);
        }
    }


if (isset($cookieParams['domain'])) {
    $cookieParams['domain'] = $cookie->getDomain();
} */

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kesammio
Jr. Member
 
Total Posts:  4
Joined:  2009-07-29
 

Funny- I was working on mine after install it refused admin log in. I double clicked time, Pointed to Internet time activated Sync, Tried to login and it worked fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
laurabinos
Jr. Member
 
Total Posts:  2
Joined:  2010-03-21
 

This solution is for magento-1.4.0.1:

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

- and comment just line 100 like this

// call_user_func_array(’session_set_cookie_params’, $cookieParams);

Trust me, It will work after that!

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