PRESTASHOP MANIA

FREE PRESTASHOP THEMES & MODULES DOWNLOAD, PRESTASHOP TIPS & TRICKS, PRESTASHOP TROUBLESHOOTING

Blog Archive

Total Pageviews

Showing posts with label redirect. Show all posts
Showing posts with label redirect. Show all posts

Prestashop Troubleshoot - Login page keeps appearing on Back office

Written By Mr. D on Monday, February 6, 2012 | 8:24 PM

After you've successfully installed Prestashop on your hosting, some problem might occur. One of the most common problem is some user (admin) always redirect to login page while managing their website on Back office. This is caused by Authorization issue in Prestashop's cookie file. This issue often occurs in Prestashop version 1.4.6.x and has not been fixed in the beta version.

Prestashop Login Page redirect problem

I have some trick to solving this issue, all you have to do is change two lines of your prestashop's cookie file.
That file is located at prestashop/classes/Cookie.php (Prestashop = your public html on cpanel file manager).

Follow This two simple steps:

Step 1
Line 65, try to find this code:
$this->_expire = isset($expire) ? intval($expire) : (time() + 1728000);

change 172800 value into 3600, after you change, it must be like this:
$this->_expire = isset($expire) ? intval($expire) : (time() + 3600);

Step 2
Line 195, try to find this code:
AND (!isset($this->_content['remote_addr']) OR $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()))

just add "//" (without quotes of course) exactly before "AND", so it would be like this:
//AND (!isset($this->_content['remote_addr']) OR $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()))

Done!
Then save your cookie.php file and try to refresh your browser. Hope you enjoy your time with this awesome CMS. 

If you don't want to edit the coding of the file, you can download the cookie.php file directly from here.
Prestashop Login Page - Cookie.php
8:24 PM | 20 comments | Read More