PHP Magento Background Unable to login problem solving method _php instance

Source: Internet
Author: User

PHP Magento The background can not be logged solution

Maybe many friends have the same experience, Magento in the server to configure the domain name is normal access, but after the local configuration can not log in the background, the account password when the login found that there is a blank, can not jump to the background, this article to introduce two solutions to the local magento can not log in the way, A friend in Need can refer to it.

Workaround One:

This is a cookie problem, using a non-IE core browser such as Firefox to solve this problem, although the way the browser handles cookies is similar but not 100% identical, Magento Other versions have this problem.

The way to fix this problem in detail is to navigate to: app/code/core/mage/core/model/session/abstract/varien.php.

Around 70 lines you can see something like this:

Set Session cookie params
/* Code Agriculture Tutorial http://www.manongjc.com * *
session_set_cookie_params (
$this-> GetCookie ()->getlifetime (),
$this->getcookie ()->getpath ()//comments dropped or deleted
 

Workaround Two:

No localhost landing,

To your IP address login: For example http://192.168.1.100/plus background address,

You can also point to the other addresses in Apache,

This problem does not normally occur on the server, and does not need to be modified.

magento1.9 Backstage Unable to login problem

Open magento/app/code/core/mage/core/model/session/abstract/varien.php

Find the following code, comment out $cookieparams[' domain ' = $cookie->getdomain (); it's OK.

if (Isset ($cookieParams [' domain ']) {
$cookieParams [' domain '] = $cookie->getdomain ();
}

The results are as follows

if (Isset ($cookieParams [' domain ']) {
//$cookieParams [' domain '] = $cookie->getdomain ();
}

But after doing this, there was an error, so I commented out the following paragraph

if (Isset ($cookieParams [' domain '])) {
//$cookieParams [' domain '] = $cookie->getdomain ();
// }

Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.