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 temporarily until that version is removed entirely.)
How to Test PHP 8.0 Early
- Log into your cPanel interface at https://sg-bby-cpanel0.stargate.ca:2083
- In the Software panel, open the MultiPHP Manager
- Activate the checkbox next to your domain
- Change the PHP Version in the drop-down list to "PHP 8.0 (ea-php80)"
- 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 we strongly urge you to continue working towards running your site under PHP 8.0. Customers continuing to use PHP 7.4 do so at their own risk. That version will receive no further security updates, even if new vulnerabilities are found. PHP 7.4 will eventually be removed from the server at a later date (yet to be determined).
Stargate has already undertaken 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.
We'll update this list as new issues are encountered by customers using PHP 8.0:
(Last Updated: December 2 at 1:00pm)
- 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
- PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc()
get_magic_quotes_gpc()was deprecated in PHP 7.4 and removed in PHP 8.0
- PHP Fatal error: __autoload() is no longer supported
__autoload()was deprecated in PHP 7.2 and removed in PHP 8.0. Use
- PHP Warning: Undefined array keys
Referencing undefined array keys now adds warnings to error_log files, potentially filling them quickly and consuming quota disk space. Keys that may not exist should first be checked with
- Version of WordPress not compatible with PHP
Some customers are still using versions of WordPress core (5.5 and earlier) that do not support PHP 8.0. Consult the Supported Version Chart at WordPress for details.
- PHP: Migrating from PHP 7.4.x to PHP 8.0.x
- PHP: Backward Incompatible Changes (version 8.0)
- PHP: create_function (removed in PHP 8.0)
- PHP: Anonymous functions (alternative to create_function)
- PHP: get_magic_quotes_gpc (removed in PHP 8.0)
- PHP: __autoload (removed in PHP 8.0)
- PHP: spl_autoload_register (alternative to __autoload)
- PHP: array_key_exists and PHP: isset
- PHP: Supported Versions (support timeline)
- PHP Compatibility and WordPress Versions