This article mainly introduces relevant information on how to solve the problem of unable to log in to the PHP magento backend. Here, two solutions are provided for magento unable to log in. Friends in need can refer to it
PHP Solution to Magento backend failure to log in
Maybe many friends have the same experience. Magento can be accessed normally after configuring the domain name in the server, but after configuring it locally, it cannot log in to the backend. Login with account and password Sometimes I find that there is a blank space and I cannot jump to the backend. This article introduces two methods to solve the problem of being unable to log in to the local Magento backend. Friends in need can refer to it.
Solution 1:
This is a cookie problem. This problem can be solved by using non-IE core browsers such as firefox. Although the browser handles cookies The method is very similar but not 100% the same. Other versions of Magento also have this problem.
The detailed method to correct this problem is to locate: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.
You can see something like this around line 70:
// set session cookie params /* 码农教程 http://www.manongjc.com */ session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath() // 注释掉后面或删除
Solution 2:
No need to log in with localhost,
Change to log in with your IP address: for example http://192.168.1.100/ and add the backend address,
You can also point to other addresses in apache,
This problem generally does not occur on the server and does not need to be modified.
Magento1.9 background cannot log in problem
Open magento/app/code/core/Mage/Core/Model/Session/Abstract/varien.php
Find the following code and comment out the line $cookieParams['domain'] = $cookie->getDomain(); and that's it.
if (isset($cookieParams['domain'])) { $cookieParams['domain'] = $cookie->getDomain(); }
The result is as follows
if (isset($cookieParams['domain'])) { //$cookieParams['domain'] = $cookie->getDomain(); }
But after doing this, an error still occurs , so I commented out the following paragraph
//if (isset($cookieParams['domain'])) { //$cookieParams['domain'] = $cookie->getDomain(); // }
The above is the entire content of this article, I hope it will be helpful to everyone's study.
Related recommendations:
PHP method to implement email sending instance based on SMTP protocol
phpImplement uploading excel tables and obtain data
PHP implements the method of regular regular verification helper public class
The above is the detailed content of Solution to the problem of unable to log in to the PHP magento background. For more information, please follow other related articles on the PHP Chinese website!