0

I'm developing on a shop, local, and starting it with

php -S localhost:3000

http://localhost:3000 works for me.

But when I want to login into backend, it keeps displaying only the login page. I also created a new admin user using n98-magerun, I've deleted all cookies, and still can't login...

The web/unsecure/base_url and web/secure/base_url in core_config_data are also set to http://localhost:3000.

What could be the problem?

1
  • Did you check if your session data is beeing saved and you have correct permissions set to session directory?
    – Klemen S
    Apr 27, 2016 at 11:58

5 Answers 5

3

A quick fix
========================================================================= This is an problem of saving cookie in browser! You can overcome this by by coping /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php to /app/code/local/Mage/Core/Model/Session/Abstract/Varien.php. Then look for the below code on the /app/code/local/Mage/Core/Model/Session/Abstract/Varien.php.

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

Then comment this lines.. And then try again. You should be able to login on the admin panel.

Note: If all folder not exits on the local folder then you need to create those and then paste your file.

1
  • Excellent! With this quickfix it works for me!
    – Artisan72
    Apr 28, 2016 at 7:10
2

There is a issue with sessions. This only happens when you set "session_save" in "local.xml" to "db". If you try with the option "files" there are no problems.

Error.

Recoverable Error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions) in app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 492

0

It should have to work on firefox. If you are using chrome please specify your system ip instead of localhost.

1
  • with firefox it does not work either
    – Artisan72
    Apr 27, 2016 at 11:10
0

Try to login with chrom incognito. to use incognito press ctrl+shift+n. if it's stary on login page again, just try to reload the page a couple of times. This is hapening to me a couple of times on different websites. Also I recomand you to take a look in that solution Magento 1.9 Can’t login to admin panel!

Hope it helps you. Thanks

0

I have tried all solution but none of them worked for me! Final solution was to change the location of session store. In my case session were stored in the database that was causing a problem. I have changed it to save session in the Filesystem. And it worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.