Prestashop admin login error 302, CloudFlare and LiteSpeed server - caching

We have migrated a PrestaShop(PS) v.1.7.8.7 from an Apache server to a LiteSpeed server which includes the LiteSpeed cache module for PS and crawler enabled.
CloudFlare(CF) has always been in play with both the existing and the new server.
But when we enable "proxied" in DNS settings for the new server - then we suddenly can't login at the admin URL due to a 302 error. It looks like the login page is called 2 times in a row. All other functionality on the site works flawless.
Screenshots of the main-domain which is "proxied" via CF:
When we disable "proxied" in CF then we can login via the PS Admin page again as seen in the screenshot below:
Screenshot of the test-domain which is not "proxied" via CF:
The page just redirects to itself again and doesn't complain about wrong user credentials or similar.
We believe it's due to Litespeed's re-write logic. We have tried to disable the LiteSpeed cache module again (the LiteSpeed's rewrite rules are of course still unchanged even though the cache module has been disabled in PS) - and the issue remains. Somehow there is a conflict between CF and LiteSpeed in this setup which causes the redirect error. We know that WordPress has a CF module which enables CF and LiteSpeed's cache module to work simultaneously.

Related

Magento Site only works when ctrl + f5 is used

A Magento website is down in IE and in Firefox. Magento provides the following message: "There has been an error processing your request. Exception printing is disabled by default for security reasons."
However using Ctrl+F5 makes the site work.
The site works in Chrome and in Opera.
It also works if any page is requested other than the home page.
The error in the magento file in var/report lists:
a:4:{i:0;s:108:"SQLSTATE[HY000] [1203] User XXXXXXX already has more than 'max_user_connections' active
However it still works in chrome.
You have a problem with your database; Basically your database is hitting the limit for the amount of connections for that user. Check what your max_user_connections setting is at and increase it.
Be careful, as the higher that number, the more resources it will use. You have to find an even balance.
It was not a problem with Magento or the database. The web host was incorrectly caching the site. We found out when a file I uploaded still appeared in cPanel yet the file had been deleted several minutes before.
The web host flushed their cache of the site. The website immediately loaded without any error.

Magento Cookies not working on IE11 on windows 10

Im testing our site on BrowserStack and it works in all browsers but Internet Explorer 11 on Windows 10.
I can't add products to the cart and Magento is is saying I must enable cookies in the browser but I have! Also cookies are working on other sites, for example the demo site we bought our theme for.
When I go to the site below it says cookies are enabled
https://www.whatismybrowser.com/are-cookies-enabled
Not sure what to do? Could it have something to do with my server or magento configuration?
We have Magento 1.9.2 running on an NGINX / HHVM server on a AWS ec2 box with Ubuntu 14.04.
Update
I noticed that if I change Use HTTP Only to NO in System > Configuration > General > Web I can now add things to the cart and cookies seem to be working but the browser is still redirected enable-cookies CMS-page if the click on enable cookies in the Cookie notice at the bottom of the page.

Magento Manage customer not working after upgrade from 1.7 to 1.9

After i upgraded the magento from 1.7 to 1.9,
I am not able to access manage customer section from admin dashboard.
I am getting following error.
Gateway Time-out
The gateway did not receive a timely response from the upstream server
or application.
Edit:
If i clear the cache it works for the first time and then the issue will reappear if i try to access the manage customer section again.
check your installed extensions if you find any extension for manage customer then disable it and check after refresh cache.
This error generally comes when one server waits for response from another server for too much time. But it could be anything. What I would suggest you to check the Mage_Customer module and if it is enable try to remove log of the website as it make website slow. For removing the log try this
login to shell(SSH) panel and go to your website root/shell folder.
execute the below command inside the shell folder
php -f log.php clean

Magento sub-domain redirecting to main domain even in separate server and DB

I have live magento site yyy.com configured using nginx in linux AWS AMI its using AWS RDS for database.
For the development purpose i have created the development server from the current live server image and for the development purpose
i have created a sub-domain dev.yyy.com and for the development also i created a new RDS server and the dumped the live server databases content.
I have changed both the secure to insecure URL from yyy.com to dev.yyy.com in the core-config-data and upadted the dev database details in the local.xml
config file also and clear the cache and session folder.
The issue is if I load the dev.yyy.com means its taking me to yyy.com.
I put new index.php containing "Hi this test"vinstead of magento index.php in the dev.yyy.com root directory means i can see Hi this test in the browser when i load dev.yyy.com.
Is there any configuration in nginx like return or redirect to resolve this issue.
and if anyone tell me this nginx related problem or magento files related problem. It will be very helpful for me to check further.
I working on this 2 days.
I would check all the values in core_config_data to see if yyy.com is still in there. You may have missed a config or there could be a customization redirecting you.
Also check your .htaccess for any redirect rules that shouldn't be there.
Also make sure you've cleared the contents of var/cache/ and var/full_page_cache/.

Magento From local server to live web server, links not working

Now, the homepage is working fine but every link on it directs you to a 404 not found error. Can't even access "/admin".
Just add "index.php" next to the domain. For ex: If your website name is www.google.com then try to access this as www.google.com/index.php/electronics/cell-phones.html
This is due to the url rewrite in magento.
Permanent solution: Go to the admin and follow this:
System-> Configuration -> Web ->Search engine Optimization -> Url Web Server Rewrites. Make this to YES and SAVE the changes.
Now clear the cache and navigate to all the page in your website.

Resources