Our prestashop webshop is being moved to a new server. Everything is set up (except store URL is messed up) The index.php script just doesn't get executed. It downloads as a file called "download" in my browser. That's strange, because I can execute php from the same place, for example the webserver came with a basic file containing phpinfo output, with definately runs from the same folder. Permissions are OK.
Additional details (maybe important): For users to be able to purchase items while the process is done, the DNS records will be updated as soon as everything's ready. Till it's done I can't issue an SSL certificate, because the CA checks if the domain resolves to my ip. I don't wanna mess with self-signed either. So the store domain resolves to the new ip but only according to my local hosts file, and the store protocol is set to https, which is not right, but I haven't found a way to change it without the admin dashboard. It's running on a LEMP stack with PHP7, PHP FPM.
If PHP FPM is properly configured in the websever config files, it should stop serving php files as downloads. (This would be the best scenario, works for 99 percent of websites)
The thing is, why I was getting these after every other page worked, is simply that Google Chrome sucks. Even in incognito mode, it has some built-in invisible caching magic, which cannot be circumvented. It works like this: Chrome realizes that once there was a working SSL protected version of your site available, so it starts redirecting http to https as soon as http returns any response code other than 200. Use multiple browsers for testing! :)
But even though the http version could be reached in other browsers without forced redirection, Prestashop also needed something. I had to issue a valid certificate for the domain pointing to the new IP. Manually disabling SSL in the database simply doesn't work, Presta is a bigger mess than that. I was only able to restore the non-https state after ssl had already been enabled and the admin dashboard became available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With