Dear Customer,

Urgent information for those who need to adapt their web space to php 8.1/8.2 versions

With this information we would like to make you aware that on some of our servers PHP 7.4 will no longer be available, it will therefore be necessary to adapt your codes to PHP 8.2.

The change on the Swiss servers is imminent (within approximately 1 month maximum) while on the European servers it has already been carried out and the following are available: php 8.0, 8.1, 8.2 and php 8.3.

We advise all our valued customers who have websites with CMS (e.g. wordpress, joomla) to check whether the version you are currently using will also be compatible with version 8.2 which will mainly be used as the default solution.

Contact your trusted webmaster so that he can already take the appropriate measures to carry out the necessary updates, we will list the elements that need to be checked:

  1. Themes
  2. Plugins
  3. Php scripts in general

All these elements that were previously written on PHP 7.4 now need to be updated (from the same manufacturers' sites) to PHP version 8.1 or 8.2 (we recommend 8.2 if possible).

Usually the creators of plugins, themes or scripts have a website where you can check if their code is compatible for version 8.1/8.2. If it is, download the new plugin or theme and install it.

Here we provide you with step by step instructions for updating WordPress so that it works correctly on 4host servers with PHP 8.0/8.1/8.2:

  1. The first step is to log in to the customer area: https://www.4host.ch/clienti/login
  2. in services > my services > find your web space.
  3. click on "details" to enter the details of your web space
  4. on the left you will find in the actions submenu, click on "Log in to cPanel"
  5. once you enter cPanel you will find the "software" > "multi php management" submenu > from here you can select the version of php to use (we recommend 8.2)
  6. If your website presents a blank page or 500 error after 1 minute, continue from step 7 …
  7. From the file submenu > "File manager" (also called "File manager")
  8. enter the "logs" folder of your main account and you should find a file (example if you have registered the domain: mysite.ch) > mysite_ch.error.log
  9. open it and check the last error lines.
  10. If they are warnings, these can be ignored, while Fatal Errors absolutely need to be corrected.

Here's if any fatal errors are found, for example:

PHP Fatal error:  Uncaught Error: Call to undefined function ini_set() in /home/miosito/public_html/wp-includes/load.php:609

It means that on line 609 of the "load.php" file there is an ini_set() function that 4host.ch keeps disabled for your security and which therefore must be commented out, open that file with the cPanel file manager and go on line 609 to comment the line like this:

//ini_set( .........

Simply by placing the comment sign "//" (without the quotation marks), as in the example above, for all the ini_sets you find, then repeat the operations for all the other messages that gradually appear in the file within the file: mysite_ch.error.log until you no longer find fatal errors caused by ini_set.

At this point the website and the administrative part of Wordpress or your current CMS will work again. If it still doesn't work, repeat this error check so that there are no other PHP "fatal errors". Usually the site returns to working normally when the error log no longer contains fatal errors but only warnings.

If you find other fatal errors that do not concern the ini_set, which are perhaps due to an old theme or old plugin, you will have to contact the creators of the theme or a given plugin and overwrite the plugin or theme via ftp/file manager, which does not it is currently working with the version of php you are using.

N.B.: 4host remains available upon request to make the switch to support@4host.ch or 0041 77 431 66 54 also on whatsapp and/or telegram. We recommend that you first write to us on the support channel anyway before contacting us by phone or by whatsapp/telegram.

Final notes: These interventions are also possible by other qualified webmasters or IT experts. You can simply deliver these directives to whoever is following your website (your trusted webmaster).

Kind Regards.



Tuesday, April 2, 2024

« Back