PHPmagento cannot log on to the background. how can this problem be solved?

Source: Internet
Author: User
This article describes how to solve the problem of logon failure in the background of PHPmagento. magento cannot be logged on, and provides two solutions, for more information about how to log on to the PHP magento background

Many of my friends may have the same experience. magento can be accessed normally by configuring the domain name on the server, but cannot log on to the background after local configuration. when the account and password are logged on, a blank space is found, unable to jump to the background. This article introduces two methods to solve the problem that the local magento background cannot log on. For more information, see.

Solution 1:

This is a cookie problem. using firefox and other non-IE core browsers can solve this problem. Although the browser processes cookies in a similar way, it is not 100% the same, and Magento other versions also have this problem.

The detailed method to solve this problem is to locate: app/code/core/Mage/Core/Model/Session/Abstract/Varien. php.

You can see something similar in around 70 rows:

// Set session cookie params/* code Farm tutorial http://www.manongjc.com */session_set_cookie_params ($ this-> getCookie ()-> getLifetime (), $ this-> getCookie () -> getPath () // comment out or delete

Solution 2:

Do not use localhost to log on,

Change to your IP address login: for example, http: // 192.168.1.100/add the background address,

You can also point to another address in apache,

Generally, this problem does not occur on the server and does not need to be modified.

Magento1.9 cannot log on to the background

Open magento/app/code/core/Mage/Core/Model/Session/Abstract/varien. php

Find the following code and comment out $ cookieParams ['domain '] = $ cookie-> getDomain (); this line is enough.

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

The result is as follows:

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

However, after performing this operation, an error still occurs, so I comment out all of the following sections.

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

Thank you for reading this article. I hope it will help you. thank you for your support for this site!

For more articles about how PHP magento cannot log on to the background to solve the problem, please follow the PHP Chinese network!

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.