After setting up the Magento Community Edition (ver. 1.7.0.2) on my local machine for development, I found that I am not able to login in to the admin section. I entered correct username and password but it redirected me back to the same admin login page with no error message. If I enter incorrect login details it does give me the error “Invalid User Name or Password”. I am using Windows Xp and Xampp Version 1.8.1 (Apache 2.4.3, MySQL 5.5.27, PHP 5.4.7) and I was accessing my Magento admin using url “http://locahost/magento/index.php/admin”.
One of my friends faced the issue that he was able to login in Firefox but not in Chrome.
Here are my findings to fix this issue:
1. Use 127.0.0.1 instead of localhost when installing on local machine.
When installing Magento on your local machine enter the IP 127.0.0.1 instead of localhost in the base URL e.g: http://127.0.0.1/magento/
If you have already installed Magento then you can update the “base URL’s” in `core_config_data` table of your database.
2. Setup a virtual host and access your local Magento website like on a real domain.
You can setup a virtual host as described at http://www.techawaken.com/creating-virtual-hosts/. After setting up a virtual host you need to make an entry in the hosts file. In Windows Xp the file is located at “C:\WINDOWS\system32\drivers\etc”. The “hosts” file already has sample entries but commented. You need to enter IP address followed by a tab space and then the hostname in a new line in the hosts file; example below
127.0.0.1 mymagentowebsite.com
3. Override the “app/code/core/Mage/Core/Model/Session/Abstract/Varien.php” file in local development environment.
Copy the file “app/code/core/Mage/Core/Model/Session/Abstract/Varien.php” to “app/code/local/Mage/Core/Model/Session/Abstract/Varien.php” and then comment out the lines 89-91 as below:
// session cookie params $cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );
NOTE: You do not need to override this file when deploying code to production.
Kelley
November 08, 2013Thanks for any other informative web site. The place else may just I get that type of information written in such an ideal manner? I have a undertaking that I’m just now working on, and I have been on the look out for such info.
AddieHannan
December 07, 2014excellent post, very informative. I wonder why the opposite specialists of this sector do not notice this. You should continue your writing. I’m sure, you’ve a great readers’ base already!
AddieHannan
December 07, 2014I have been browsing online greater than three hours today, but I by no means discovered any interesting article like yours. It is beautiful value sufficient for me. Personally, if all website owners and bloggers made just right content as you probably did, the web will probably be much more useful than ever before.
LakeishRossi
December 07, 2014Hey there! I know this is kinda off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having trouble finding one? Thanks a lot!
Pawan
December 09, 2014You can integrate Google ReCAPTCHA [https://www.google.com/recaptcha/intro/index.html]. If you are using WordPress then you can download a pulgin from the WordPress.org Plugin repository [check https://wordpress.org/plugins/search.php?q=recaptcha&sort=, https://wordpress.org/plugins/search.php?q=captcha&sort=]
LakeishRossi
December 07, 2014An impressive share! I have just forwarded this onto a colleague who had been doing a little research on this. And he in fact bought me dinner simply because I stumbled upon it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending the time to discuss this subject here on your site.
AlinaAARXrnq
December 15, 2014Hmm it appears like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to the whole thing. Do you have any tips and hints for first-time blog writers? I’d really appreciate it.
Bev93Litbzemnzet
January 20, 2015My relatives always say that I am killing my time here at web, except I know I am getting familiarity all the time by reading such nice content.