Upgrade from PHP 7.4 to PHP 8.0

PHP is the server-side scripting language that runs on several web servers hosted at Stargate Connections. This language is used by many common web applications such as WordPress, Drupal, Joomla!, and many custom websites and web form processors.

PHP has a regular upgrade cycle, and on November 28, 2022, Version 7.4 (the current default) will reach end-of-life, requiring us to set the new default to PHP Version 8.0.

While every upgrade has the potential for deprecated and removed features, it has come to our attention that one function in particular, "create_function()" deprecated in PHP 7.2, has been removed from PHP 8.0 entirely due to its security risks. This is a good thing. However, any script or plugin that uses this function will encounter errors after we make the switch to PHP 8.0 on November 28.

(* We will update "Encountered Issues" below as new issues are discovered during testing.)

We are encouraging all customers that host PHP-driven websites at Stargate — especially WordPress sites — to take the opportunity to test their site for compatibility with PHP 8.0 prior to the switch. This version is already installed as an alternative option, and customers and/or their developers can switch to it at any time for testing purposes. (It is also possible to switch back to 7.4 as necessary, at least until November 28.)

How to Test PHP 8.0 Early

  1. Log into your cPanel interface at https://sg-bby-cpanel0.stargate.ca:2083

  2. In the Software panel, open the MultiPHP Manager

  1. Activate the checkbox next to your domain

  2. Change the PHP Version in the drop-down list to "PHP 8.0 (ea-php80)"

  3. Press Apply

At this point your website will be running under PHP Version 8.0. Check all of your pages and test all of your interactive features such as web forms, WordPress administration, etc. Use the cPanel File Manager or SFTP access to check for any "error_log" files that have been generated. These will contain reports of PHP warnings and fatal error messages.

IMPORTANT: If any errors are encountered, you must resolve the problems to ensure your website works properly after November 28, 2022. You may temporarily switch back to PHP 7.4 as necessary, but the upgrade to PHP 8.0 will be mandatory once this date arrives.

Stargate will already be undertaking these updates for customers who use us as their web developer. Other customers will need to contact their current web developer and/or update their websites themselves (e.g. WordPress) by ensuring the core application, plugins, and themes are current and up-to-date, as handled through those applications' dashboards.

For any customers who have lost access to their original developers, please read our support page on Changing Website Developers.

Encountered Issues

We'll update this list as new issues are encountered by customers testing PHP 8.0:
(Last Updated: Thursday, September 22 at 2:43pm)

  • PHP Fatal error:  Uncaught Error: Call to undefined function create_function()
    create_function() – security risk due to internal eval() function; deprecated in PHP 7.2; removed in PHP 8.0
  • PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported
    Support for deprecated curly braces for offset access was removed in PHP 8.0. Use $var[$idx] instead of $var{$idx}.

References: