Question and Answer Section - After upgrading to PHP version 7.2

Q: My website has gone offline since the PHP 7.2 upgrade
A: Check any error messages displayed in the browser and the PHP error log in the `logs` directory of your webspace.
Possible problems:

  • you made changes to your PHP5 php.ini, and may need to do so again – see below
  • you see errors such as `PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()` - your PHP code is using an old function that has been removed from PHP – check the documentation at https://www.php.net/manual/en/function.mysql-connect.php which suggest the use of an alternative – mysqli_connect should work fine
  • the connection to your MySQL database is failing – the new PHP version libraries will not use old-style MySQL password hashing; if your database is using this style of password hash, then it is simple to reset it using the instructions below

Q: How do I reset my MySQL password?
A: Login to your control panel here: https://admin.clarahost.co.uk/login

  • Once logged in please select your domain on the left
  • Click on Databases on the top right
  • Select Edit Password and type a new password, you cannot use the same password however adding an extra character is sufficient
  • FTP into your webspace and find the appropriate config file that contains the database connection details (eg `wp-config.php` if you are using WordPress) and edit to set the correct password as you just set

Q: What happens to my php.ini ?
A: The php.ini file for PHP 7 is in a different location in your webspace to the existing PHP 5 one. If you made any custom changes to this file, you may need to make them again in the new location: `/conf/php-7.2/php.ini`

You can refer to your old php.ini, which is untouched, in `/conf/php/php.ini`.

Note: the existing php.ini is not used or automatically moved across because it would likely contain directives that are no longer valid for PHP7.

Q: Parts of my website are not displaying properly
A: Certain themes and plugins may not be compatible with PHP 7.2, please check with the Wordpress website to ensure you have the later updates for these themes and plugins
If you are not using a CMS such as Drupal/WordPress and wrote your own PHP code to run your website, then check for any error messages (and in error logs) to see what the problem is. You can refer to the PHP changelog https://www.php.net/manual/en/migration70.php for guidance.

Q: How does this affect my website if it is not hosted with Claranet?
A: It won’t, this change only affects websites on the Claranet hosting platform

Q: How do I access error logs?
A: The website error logs (and access logs) are located in the webspace in the `logs` directory. To access, , FTP to your webspace and download the most recent log files which are in the format `error.log.` eg `error.log.20220106`. This is a plain text file which should open in any text editor.

Q: I don’t even run PHP, why am I seeing any change?
A: We also support other interpreted languages such as PERL on the platform and these are bundled into the PHP environment, so if you are using eg PERL then your webspace will still be affected by the retirement of PHP5. These extra supported languages are only available in a non-standard configuration and when your webspace was migrated it should have automatically moved to the compatible configuration. If not then please contact support, who will be able to get this sorted for you.

Q: I run PERL/CGI scripts and they don’t seem to be working anymore
A: Please contact the SOHO Support Team as certain scripts will stop functioning under the new version, we can request these enabled on an account basis

Q: What is the maximum memory a CGI process can consume?
A: The maximum limit for a CGI process is 312M

Q: Is there anything else I should know or do?
A: You should ensure your Wordpress install, themes and plugins are the latest versions. This is recommended by Wordpress themselves due to security fixes

The SOHO Support Team can be contacted in the following ways

Phone: 0800 640 8010
Email: support@claranetsoho.co.uk
Contact Form: https://www.claranetsoho.co.uk/contact-us