{"id":31,"date":"2009-07-12T05:22:00","date_gmt":"2009-07-12T05:22:00","guid":{"rendered":"http:\/\/www.codeboss.in\/web-funda\/?p=31"},"modified":"2009-07-12T05:22:00","modified_gmt":"2009-07-12T05:22:00","slug":"magento-admin-login-problem","status":"publish","type":"post","link":"https:\/\/codeboss.in\/web-funda\/2009\/07\/12\/magento-admin-login-problem\/","title":{"rendered":"Magento Admin Login Problem"},"content":{"rendered":"<p>From Magento version 1.2.1 you will notice that suddenly you cannot log in to the admin panel after you have installed Magento. And this happens only when you install it locally and use http:\/\/localhost\/<\/p>\n<p>The reason is Magento have implemented a security check to see the domain is a valid one with dots in it. http:\/\/localhost\/ hence fails as a valid domain.<\/p>\n<p>There are two remedies for it &#8211;<\/p>\n<p>1. Use 127.0.0.1 instead. Having dots it will qualify.<\/p>\n<p>2. Modify your host file to use http:\/\/www.localhost.com instead of simple http:\/\/localhost\/<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For this follow these steps if you are using Windows XP &#8211;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a>  Open file C:\\WINDOWS\\system32\\drivers\\etc\\hosts (Replace C: with the drive name where your OS is installed)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b>  Add the following line at the end of the file and save it.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www.localhost.com<\/p>\n<p>Apart from the 2 above mentioned points you can also hack the Magento core a bit. But as that is not the correct way lets not discuss it \ud83d\ude1b<\/p>\n<p>Now while installing Magento, in the Configuration step, under &#8220;Web access options&#8221;, for &#8220;Base URL&#8221; use http:\/\/127.0.0.1 or http:\/\/www.localhost.com\/ according to what you would be using.<\/p>\n<p><span style=\"font-weight:bold;\">If you have already installed Magento with &#8220;localhost&#8221;<\/span><\/p>\n<p>Do not worry if you have already installed Magento with &#8220;localhost&#8221; as &#8220;Base URL&#8221; and your store keeps going back to http:\/\/localhost even if you enter http:\/\/www.localhost.com<\/p>\n<p>Just follow these steps &#8211;<\/p>\n<p>1. Open the Database<br \/>2. Open table <span style=\"font-style:italic;\">core_config_data<\/span><br \/>3. UPDATE <span style=\"font-style:italic;\">value<\/span> of the record WHERE <span style=\"font-style:italic;\">path<\/span> = &#8216;web\/unsecure\/base_url&#8217; from localhost to 127.0.0.1 or www.localhost.com<br \/>4. Follow the same for <span style=\"font-style:italic;\">path<\/span> = &#8216;web\/secure\/base_url&#8217;<br \/>5. Go to \\var\\cache and delete all folders.<\/p>\n<p>Now you can use the site with www.localhost.com or 127.0.0.1<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Thanks Joseph. I skipped the second part of configuration during installation initially. Just to make it sure, I hope you were talking about the &#8220;Base Url&#8221; and not the &#8220;host&#8221; (which is actually the host of the database) in the comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From Magento version 1.2.1 you will notice that suddenly you cannot log in to the admin panel after you have installed Magento. And this happens only when you install it locally and use http:\/\/localhost\/ The reason is Magento have implemented a security check to see the domain is a valid one with dots in it.&hellip; <a class=\"more-link\" href=\"https:\/\/codeboss.in\/web-funda\/2009\/07\/12\/magento-admin-login-problem\/\">Continue reading <span class=\"screen-reader-text\">Magento Admin Login Problem<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[54,57],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-magento","tag-php","entry"],"_links":{"self":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}