Magento Forum

   
Can’t login to admin after installation. 
 
mercedess
Jr. Member
 
Total Posts:  5
Joined:  2010-01-01
 

This problem did not occur for the above users with earlier releases, and I’ve got the same issue now as well.  Never had an issue like this with the last 4 releases....

 
Magento Community Magento Community
Magento Community
Magento Community
 
dedeblank
Jr. Member
 
Total Posts:  1
Joined:  2010-01-01
 
JulianM - 09 October 2009 06:29 AM

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

thx mate
its work for me!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bimbolera
Jr. Member
 
Total Posts:  2
Joined:  2010-01-11
 
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 SOLVED MY PROBLEM! i would like to request for a nice explanation regarding this. i believe it has something to do with url names domain, i’m just not sure, please be kind to us. thanks for the great code!

 
Magento Community Magento Community
Magento Community
Magento Community
 
helmuthk
Jr. Member
 
Total Posts:  1
Joined:  2009-12-22
 
rabidsheika - 09 July 2009 12:53 PM

I’m somewhat knowledgeable with php, and my install went fine, but I still cannot log in to my admin panel! I have installed on a localhost, php is up to date, I have tried everything mentioned in all the google universe! 127.0.0.1, does not work, and when I comment the lines mentioned earlier in the varien file I cannot access my Magento install at all, I get this error:

Parse error: parse error in C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Session\Abstract\Varien.php on line 84

I know I’m probably missing something obvious, perhaps I skipped a step during my install… I’m getting a little frustrated after 3 days of working on this, I’m considering switching to zen cart at this point.

Any advice would be greatly appreciated.

I realize that I’m replying to an old post, but the reason why you have that parse error is that you haven’t removed the comma ( , ) after:
$this->getCookie()->getPath()

That section should look like this, by default:

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

After change:

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

Notice the comma ( , ) has been removed after ‘getPath()’
Hope you haven’t given up and this helps anyone else.

 
Magento Community Magento Community
Magento Community
Magento Community
 
es_mattu
Jr. Member
 
Total Posts:  6
Joined:  2009-12-04
 

Hi

Is there anyway of getting a local magento install to use hosts file. For some strange reason I am not able to get this to work. I have followed the instructions on the wiki for a xampp install and changed my host file. Still now luck.

Any help would be greatly appreciated.

Regards
Eishpal Mattu

 
Magento Community Magento Community
Magento Community
Magento Community
 
es_mattu
Jr. Member
 
Total Posts:  6
Joined:  2009-12-04
 

Hi All,

Okay I have no idea what I have done, but I managed to access the admin area using http://localhost/ with out changing any of the files. I hope there will be a simpler method to installing a local dev version on a windows machine.

Regards
Eishpal Mattu.

 
Magento Community Magento Community
Magento Community
Magento Community
 
omarfarooq
Jr. Member
 
Total Posts:  7
Joined:  2009-09-28
 

hmm try this
....

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()
);
*********************Comment the last three options****************************

-Save it and try to login to your magento admin panel.
It would work. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hax0r
Jr. Member
 
Total Posts:  1
Joined:  2010-02-14
 

Found a simple solution: http://newbitsontheblog.com/magento-localhost-admin-login-problem/

 
Magento Community Magento Community
Magento Community
Magento Community
 
J-Mod
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2009-12-28
 

On your windows machine, go to Start -> Run and type “drivers” ... then go to the etc folder and open the “hosts” file (choose notepad from the list of programs that will be presented to open it).

Once you have the hosts file open, add the following line ....

127.0.0.1 http://www.localhost.com

.... save the hosts file.

==============================

Next use phpMyAdmin to open your Magento database ... once you have it open, find the table named ...

core_config_data

....and change the values for .....

web/unsecure/base_url/
web/secure/base_url/

(these are config_id 2 and 3, respectively)

... to ...

http://www.localhost.com/

Start browsing your development environment using the http://www.localhost.com domain name from here on out, and you’ll be good to go.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Muthu3982
Jr. Member
 
Total Posts:  5
Joined:  2010-02-15
 

Hi All,

I have tried by giving http://127.0.0.1/magento/index.php/admin/ instead of http://localhost/magento/index.php/admin/, this is the path where i installed magento, but its not working for me, it will redirect me to the magento front panel home page http://localhost/magento.

can any one guide me to solve this issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vivekananthan
Member
 
Avatar
Total Posts:  44
Joined:  2009-06-17
 

If its magento 1.4 then go to the following file:
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

On Line no: 78

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

        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();
        
}

Change it to:

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

        
/*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();
        }*/

That’s it, it would work smile
Let me know if you have any problems on that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
techmodi
Jr. Member
 
Total Posts:  1
Joined:  2010-02-17
 

Hi, i m not able to login from admin after magento installation 1.4.0.0 version.

Kindly help…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jvfconsulting
Jr. Member
 
Total Posts:  4
Joined:  2010-02-19
 

We also experienced the same login problem everyone here is talking about. There is only one way to fix it, and thats to install Magento correctly onto your local machine. To do this I wrote a how to article with screenshots! Check it out here, this should fix everything! http://www.jvfconsulting.com/blog/117/How_To_Install_Magento_Locally_On_Windows_XP.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
gvassilev
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-07-14
 

I have a very strange problem. My clients cannot login to the frontend/in to their accounts/ form the top link “Log in”. When I presave their accounts, they can login to the frontend and manage their accounts, etc… Everything works fine, but not for long, few hours later the account is bugged and need to be edited and saved.

Also it’s very strange that this “bugged” customers accounts, has no problems when logging through the checkout form !?! After successful checkout, the clients can log in through the top link “Log In” form and a few hours later the account is bugged again - cannot login to the front-end.

I never had problems logging in to my admin section, but now my clients suffers :/

I tried all of the methods mentioned in this thread, but nothing helps.

I’m on Magento 1.3.2.4, files sessions, cookie life time: 84600, correct server/local time. Tested on Safari, FF, IE.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
jaiganesh
Jr. Member
 
Total Posts:  3
Joined:  2010-02-28
 

Hi Everyone,

thanks. for information. now working admin login.

thanks.... thanks lot…

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