One website that is hosted on a server I recently increased php to 7.2, If I had known the issues this would cause I might have not started but hey ho!
So I have 3 sites sharing this VPS. The other 2 are working fine. And the one that was not working momentarily appeared to be working as I saw all the warning all the sites gave me as php broke the old php code (was not 7.2 compatible).
For some reason however I get simple file not found message on the screen. So searching yesterday I found some posts but most all were nothing useful. I think I have checked the correct user. Will php user be changed somehow?
So I also get this for the sitemap.xml file so it’s not looking related to the php for me…
My server block for the php is
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @landed,
The Not Found message shouldn’t be connected to the PHP. Usually a 404 error is a result of not using the proper location for your website files.
Now I didn’t fully understand if you get 404 Not Found as a server error code or from your application. If it’s from your application, I’ll recommend checking your error log /var/log/nginx/error.log.
Additionally, please confirm PHP is actually in the mentioned directories fastcgi_pass unix:/run/php/php7.2-fpm.sock;. To do so type in
whereis php
Once you find it, replace the path in your location block with the one you have now.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.