1. Home
  2. Technical
  3. How to test and update servers with deprecated PHP versions?

How to test and update servers with deprecated PHP versions?

My Zone selfservice homepage will display a red warning sign if any of your Web Hosting servers or subdomains is using deprecated PHP versions:

Klick the warning box to open list of affected instances together with possibility to test and update version:

As the activation of new version takes ca 3 minutes and problems will be visible to all visitors we have added possibility to test only in your browser by setting a secret cookie. Access testing functionality by clicking on blue PHP 5.6 button with looking glass.

This video (audio in Estonian, sample site in English) demonstrates the testing process:

Oldest PHP version you are allowed to choose is PHP 5.6, which is also officially deprecated and does not receive security updates. We suggest upgrading to PHP 7.3 or newer if your web application supports it.

Modern web applications like WordPress supports latest PHP versions and upgrading to PHP 7.3 or 7.4 is suggested after updating WP, plugins and themes.

Older web applications may not work with PHP 7.x, as differences between 5.6 and 7.x are substancial.

Known issues on upgrade

Umlauts replaced with question marks

Default PHP 5.6 configuration adds UTF-8 encoding to HTTP response header and older websites that use other encodings in web page text or meta may need to remove this header.

Easiest solution is addint .user.ini with following setting to webservers root folder htdocs:

default_charset = ''

How to test which PHP version is in use?

Changing PHP version in server takes up to 3 minutes. To verify which version is currently in use add a .php file with random name to your websites’s root folder htdocs, containing:

<?php
phpinfo();

You can view the output by visiting example.com/random-name.php (for security reasons we recommend deleting this file).

Updated on 6. Feb 2020

Was this article helpful?

Related Articles