1

I installed a magento with sample data. Everything working fine. Only i am unable to login to admin.

When i access magento login page: at localhost/admin Then it shows this normal magento login:

enter image description here

But after login it again shows a login page but with session key in url (which seems i login)

enter image description here

this is the url generated

http://localhost/index.php/admin/index/index/key/daa4f07e53bab68173031a1b566a6c87/index.php/admin/dashboard/index/key/f5af74af31bc336d09d1bff85da57625/?SID=napqsla40jor8f5kjvt4r27210

And when i modify this url to

http://localhost/admin/dashboard/index/key/f5af74af31bc336d09d1bff85da57625/?SID=napqsla40jor8f5kjvt4r27210

Then it shows actual dashboard but without loading js and html files. ONLY HTML version.

enter image description here

Any idea why it is doing like this?

Apache Rewrite enabled

Curl Enabled

  • File permissions? – Mihai Stancu Sep 15 '14 at 9:29
  • File permission in wamp? – user2997826 Sep 15 '14 at 9:29
  • Looks like url is getting repeated twice! :P – Praveen Kumar Sep 15 '14 at 9:29
  • Yes, URL is repeating twice and also files not loading! – user2997826 Sep 15 '14 at 9:31
3

There can be 3 issues as far as my knowledge:

  1. Url issue:

Check your secure base url and unsecure base url in 'core_config_data' table. It should be something like this:

http://localhost/your_project/

You can find this row in table whose path column value is web/unsecure/base_url and web/secure/base_url.

  1. Magento Cache issue:

Go to /your_project/var/cache folder and delete all the contents. Clear browser cache as well and try reloading page.

  1. Php Curl Extension Issue:

If you are using wamp server then check if you have enabled "php_curl" extension. If not, then enable it, restart wamp server and then try loading the page.

  • There is no base url row in core_config_data – user2997826 Sep 15 '14 at 11:18
  • @user2997826, see I have updated my answer. – Pradeep Sep 15 '14 at 11:38
1

It look's like you have not set the good parameter for base_url. Go on your database -> 'core_config_data' -> 'base_url' -> 'value'

  • There is no base url row in core_config_data – user2997826 Sep 15 '14 at 11:18
  • In 'path' row search web/unsecure/base_url and web/secure/base_url, then look the row 'value' for those path – zaka47 Sep 15 '14 at 15:39
1

Don't use "localhost". Use

http://127.0.0.1/

instead. (make sure you update base urls in DB too...) Using localhost messes up cookies

1

When using "localhost" with magento, don't use chrome browser as it can't make the cookie for localhost so that it again shows login page. Try to login admin on firebox.It works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy