Frequently asked questions

Back
Keyword:  

PHP 8, how does that work?

This FAQ entry has information aimed at both non-technical and technical users and developers.

PHP 8.1 was the default for web hosting Medium or greater between December 2021 and 20 July 2023.

PHP 8.2 is the default for web hosting Medium or greater since 20 July 2023.

We offer the following PHP versions:

  • 8.0 (no longer supported since 26 November 2023)
  • 8.1 (supported until fall 2024)
  • 8.2 (supported until fall 2025)
  • 8.3 (supported until fall 2026)

If you experience problems you think are caused by our configuration or deficiencies with our servers, please first check that your software works with your PHP version and that the tips below don't work out for you before you contact our support.


Overview


What does this FAQ entry answer?

This page tries to cover some of the questions we think you may ask, or which we have received questions about. We will update it as necessary.


What is the difference between the PHP 8 versions?

There are no major differences between different PHP 8 versions on our servers. Check the PHP documentation for your version for detailed information about the changes:

The PHP-configuration for 8.x is nearly the same as 7.x. Notable differences:

  • If your CMS (e.g. Drupal, Joomla!, WordPress) and plugins/extensions or themes/templates have not been updated in years, you may get an error message, because the CMS is incompatible with PHP 8. Upgrade to the current version.
  • IonCube Loader can be activated from the control panel for your webhotel.

Which applications/services will have trouble with PHP 8.x?

Most programs and additions that ran on PHP 7.4, will run on PHP 8 as well. Check with your software vendor to make sure your software is supporting PHP 8.

Regarding self-developed code, check the links below for changes that are not backward-compatible i PHP 8.x:

If you are running self-written modules or additions in PHP 7 that have not been updated in years, you will most likely have to upgrade them to be compatible with more recent PHP versions (8.x). This includes (in most cases) IonCube Loader. Support for IonCube Loader is recommended to be activated via the control panel for the webhotel.


Can I switch between the different PHP versions?

Yes, you can freely switch between different versions.

Please note that the version changes may take up to 20 minutes.

When we announce that we're no longer supporting a specific version, you can no longer select that specific version.


Can I test/use PHP 8 on shell.domeneshop.no/via SSH?

Yes. You can use shell.domeneshop.no. This shell server automatically provides the same PHP version that you have chosen for your webhotel.


How long will you support the different PHP versions?

We will support the various versions approximately as long as PHP offers security updates, but will start phasing out before security support ends.

Please follow the link, and plan upgrades in good time. Our plans may change if PHP changes their plans regarding security updates.


My PHP-program is not working. Why?

Check How can I see PHP errors/debug PHP code? for additional help.

If you are using WordPress, activate error logging as described above. In most cases, the error messages will contain information about a WordPress plugin causing issues. This plugin can then be deactivated by deleting or renaming the plugin folder via FTP. See here for an explanation.

If you are using WordPress or Joomla, you can read more about errors/debugging about these systems here.


Known upgrade issues

If you are experiencing problems after upgrading, check this list of common problems and solutions.

Fatal error: Uncaught Error: Undefined constant "‘WP_MEMORY_LIMIT’" ... in /home/.../wp-config.php:

Such errors may also come for another "constant" than WP_MEMORY_LIMIT. The reason is that the character >‘< (Unicode U+2018) is not a valid character around strings in PHP. In PHP 7, this failed silently, in PHP 8 it results in a fatal error. The code that causes the error has never worked. Delete it, or if you want to make it work, replace >‘< (Unicode U+2018) and >’< (Unicode U+2019) with >'< (simple apostrophe, that is U+0027 APOSTROPHE in Unicode).

An error of type E_COMPILE_ERROR was caused in line XXX of the file /home/...php. Error message: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

The file mentioned uses an outdated syntax for the "ternary operator", the support for this syntax was deprecated in PHP 7.4 and removed in PHP 8.0, see the PHP documentation and update the software (which may be a plugin, a theme, or a template).

The page is blank/HTTP error 500

Joomla!/WordPress: see our short guide for trouble-shooting Joomla! and WordPress problems
Other PHP software: see our general PHP trouble-shooting guide

Silverstripe does not work

Delete the folder silverstripe-cache.

SMF does not work

Upgrade SMF to 2.1.3 or newer, or retire SMF and use other software supporting PHP 8.1.

Custom ErrorDocument does not work for PHP files, but works for other files

All filenames ending with .php are handled by uWSGI, Apache's ErrorDocument will never apply for such files.


WordPress specific guide

If WordPress is several years old, or plugins or themes are several years old, WordPress may have problems loading.

  1. Login to WordPress and disable all plugins.
  2. Update Wordpress, themes and plugins to the latest version.
  3. Purchased themes and plugins may appear up-to-date in the WP dashboard even though they are outdated. Contact the provider for a PHP 8-compatible update.
  4. Make sure that the latest version is compatible with PHP 8. You may need to check this with the developer.
  5. Remove themes and plugins that are incompatible with PHP 8. Find replacements for these.
  6. A theme mainly manages appearance, do not fear switching to a different theme if that is holding you back. It is better to fix any minor issues with appearence and functions later.
  7. Upgrade to PHP 8 when everything looks ok.
  8. Reactivate the plugins you need.
  9. If the website suddenly crashes when you reactivate a specific plugin, it indicates that it may not support PHP 8.
  10. Turn on automatic updates for all plugins and themes.

How do I change the PHP version?

  1. Login at www.domainnameshop.com
  2. Click on "My domains"
  3. Click on the domainname in question
  4. Click on the tab "Webhotel", in the top menu
  5. Click on "View/change" on the PHP line
  6. Select your desired PHP version
  7. Click on the "Update" button to execute your change

Please note that the change may take 20 minutes to take effect.

See also:

© 2024 Domeneshop AS · About us · Terms · Privacy policy