Over time, PHP releases a new version, making the previous ones obsolete. This means that they no longer receive updates or security patches, makin...
For further actions, you may consider blocking this person and/or reporting abuse
In Debian/Ubuntu, anyway :)
Super important info before any upgrade, check your code compatibility, test in your staging site or local environment the version you are going to upgrade, to avoid down time, also if you are using NGINX with PHP-FPM, there is an extra step to do and that is change your site config file to PHP-FPM version you upgrade and restart the service...
Thank you for the information
Helpful post. Liked it.
I'm glad you found it helpful.
Thanks for the clear info
GOOD but how you make the change so that apache or nginx see you changed php?
phpinfo() sometimes will show you the old version
When you change the PHP version, Apache or Nginx may not immediately recognize the update. This usually happens if the web server is still using an older version of PHP, even though the new one is installed. Here's how to ensure the change is correctly applied:
Steps for Apache
Check the installed PHP versions:
Disable the old PHP module:
Replace
X.Ywith the version you want to disable (e.g.,php7.4).Enable the new PHP module:
Replace
Z.Wwith the version you want to enable (e.g.,php8.2).Restart Apache:
Verify using
phpinfo(): Create or update yourphpinfo.phpfile in the web server's document root:Steps for Nginx
Modify the PHP-FPM socket:
Edit the Nginx configuration file (commonly
/etc/nginx/sites-available/default) and update thefastcgi_passdirective to point to the new PHP-FPM version socket. For example:Restart PHP-FPM service:
Restart Nginx:
Verify using
phpinfo(): Create or update yourphpinfo.phpfile in the web server's document root:Troubleshooting Tips