My mobile application communicates with a shared server hosted at OVH and currently uses PHP scripts compatible with PHP 5.6.
I have prepared and tested locally all of my PHP files to make them compatible with PHP 8.2.
After uploading the new files to my hosting, I plan to go to the Configuration tab to select PHP 8.2.
I have two questions about this:
Q1: Once PHP 8.2 is selected, are there any other settings or configurations to perform at the hosting level to ensure my application works correctly?
Q2: If my application encounters problems after switching to PHP 8.2, will it be possible to temporarily revert to PHP 5.6 while I identify and fix any incompatibilities?
It’s difficult to answer this question without knowing the application's dependencies
Regarding the PHP version, you can absolutely choose the PHP version you want within the general information of your hosting:
Step 1 of 4: Log in to your client area and click "Webcloud" in the menu at the top of the page, Step 2 of 4: Then click "Hosting", and then the name of your hosting, Step 3 of 4: You can then click the three small dots next to "Global PHP Version", and "Edit configuration", Step 4 of 4: Choose the "Edit current configuration" option, and click "next".
You can then choose the configuration of your choice
Hi @Gannouni, adding to what Astérix already explained about changing the version in the hosting settings, here is a practical way to make the switch and the rollback safer:
1. Keep a separate backup of the current PHP 5.6 files and any database before you upload the new files. That matters because code updated for PHP 8.2 may use syntax that will not run again on 5.6, so restoring just the version setting may not be enough on its own.
2. Before switching, check the extensions and settings your scripts actually use, such as the database driver, curl, JSON and multibyte string handling, and compare them with what is enabled for PHP 8.2. Also check the error log after the switch rather than only the app's home screen.
3. Test the exact endpoints your mobile app calls, including login, data submission and any file upload, not just a simple page load. A script can load while an API endpoint still fails.
4. For the rollback question: in general, yes, you can go back to the same PHP version setting and select 5.6 again while you fix the problem, then restore the backed-up 5.6 files if needed. Do not treat that as a long-term plan, though, because 5.6 is very old and may not remain available on shared hosting indefinitely, so it is worth fixing the 8.2 issues promptly.
Switching during a quiet period and keeping that backup until you have tested the main app flows should make the move much less stressful.