Why does the application show nothing after the PHP switch?
Every new PHP version removes old functions. If your application calls one of them, PHP aborts with a fatal error. On a live server, error display is rightly turned off; the PHP documentation advises against enabling it on systems connected to the internet. That’s why the browser often shows only a blank white page or a generic error message. The real cause is in the error log.
An error after the PHP switch often doesn’t hit the whole application: the home page works, but the login, the cart or the nightly export fails. With some hosting providers, the switch also applies separately to the website and the command line, so cron jobs run on a different version than the website. Whether your hosting provider, your former developer or you are responsible for the fix is covered in the article Who is responsible: hosting provider, developer or you?
What do you still have after the PHP switch?
Before you repair an application after the PHP switch, answer three questions in this order: access to the hosting account, a way back to the previous PHP version, a current backup. Each answer leads to a first step.
- Do you have access to the hosting account?
- Yes: Continue with question 2.
- No: Get access to the hosting account back first. If the hosting contract is in your company’s name, the hosting provider will restore it. If it’s in the name of your former developer or the agency, only that contracting party can act. How to proceed then is described in the immediate actions when the developer can’t be reached.
- Can the previous PHP version be restored?
- Yes: Set the previous PHP version back in the hosting panel for the affected website and check whether the application runs again. Switching back buys you time, but only as long as the hosting provider offers the old version. Plan the PHP upgrade right after.
- No: Continue with question 3. The way back to the previous PHP version is then closed or costs extra, as with Kreativmedia and HOSTFACTORY.
- Is there a current backup of the code, the database and the uploaded files?
- Yes: Store a copy of the backup off the server. With the backup and the error log, the application can be repaired on a copy without putting the live version at risk. If your business is at a standstill, this is a case for the emergency fix from Unique-P.
- No: Take a backup now, even if the application isn’t running at the moment. A PHP switch doesn’t delete any files: code and database are still on the server, PHP just no longer executes the code.
The first 24 hours after the PHP switch
- Record the state. Write down what the application shows: since when, which pages, which message? Take screenshots and keep the email from your hosting provider.
- Check the PHP version. The hosting panel shows which version is running now and which one ran before. Check the website and the command line separately.
- Switch back if possible. Restoring the previous PHP version is usually the fastest way back into operation. Note until when the hosting provider will keep offering the old version.
- Read the error log. The error log is in the hosting panel and in the application’s log folder: for Laravel
storage/logs, for Symfony and Shopwarevar/log, for TYPO3var/logortypo3temp/var/log. The first message with “Fatal error” is usually the one that matters. - Secure a backup. A complete backup covers code, database, uploaded files and configuration, stored off the server. A backup that only sits on the same server isn’t a backup.
- Check access. Hosting, domain and DNS, database, code repository, email delivery: who has which access, and is any of it in the name of someone who is no longer around?
- Inform those affected. Let your team and, where necessary, your customers know that orders or inquiries aren’t coming through right now.
- Only then repair. Repairs happen on a copy of the application, with the message from the log as a guide, not by trial and error on the live server. Turning off a check that reports an error doesn’t fix the error.
Typical error messages after the PHP switch
The table of typical error messages shows messages exactly as PHP and Composer output them when code or packages don’t match the running PHP version. In the log, they are usually preceded by “PHP Fatal error: Uncaught Error:” and followed by the file and line.
| Message | Cause | First step |
|---|---|---|
Call to undefined function mysql_connect() |
The mysql extension was removed in PHP 7.0, along with all mysql_* functions. |
Restore the previous PHP version if the hosting provider still offers it. Moving to mysqli or PDO usually affects every database access; it needs planning, not patching. |
Call to undefined function each() |
each() was removed in PHP 8.0. |
Rewrite the affected loop with foreach, as the PHP documentation recommends. If the code is in a third-party library, updating that library is the better way. |
Call to undefined function create_function() |
create_function() was removed in PHP 8.0. |
Replace it with an anonymous function. For libraries, look for a newer version first. |
Call to undefined function get_magic_quotes_gpc() |
Removed in PHP 8.0. The function always returned false anyway. |
Remove the call or replace it with false; the behavior doesn’t change. |
Call to undefined function mcrypt_encrypt() |
The mcrypt extension has not been part of PHP since PHP 7.2. |
Before any rework, find out which data is encrypted with it. That data must remain readable with the replacement, OpenSSL or Sodium. |
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". |
The installed packages require a newer PHP version than the one currently running. The version number depends on your packages. Typical when the version was switched back after someone installed the packages with a newer version, or when the website and the command line use different versions. | Set PHP to the required version. Turning off the check (platform-check) only hides the error. |
| No message, but customers are logged out after returning from the payment provider or a login service | Since PHP 8.6, PHP sets the session cookie to SameSite=Lax by default; at Onlime, that has also applied to PHP 8.2 to 8.5 since October 28, 2026. If another website sends users back with a POST request, the browser no longer sends the cookie. | Set session.cookie_samesite deliberately. If your application needs this path, php.net says to set it to None together with session.cookie_secure. Then run through payment and login. |
| No message, just a blank white page | Error display is turned off on the live server, as the PHP documentation recommends. | Read the error log instead of turning on error display on the live site. It contains the actual error message, with file and line. |
Other errors after moving to PHP 8, for example about types and arguments, depend more on the individual code. They also appear in the log with file and line, and the migration guides on php.net explain what changed in each version.
The way back to the old PHP version at your hosting provider
Whether and for how long you can go back to the old PHP version after a switch is handled differently by each Swiss hosting provider. Three examples (as of October 27, 2026):
| Hosting provider | What happens at the switch | Way back |
|---|---|---|
| Onlime | For PHP 8.1: announcement, email with one week’s notice, then automatic switch to PHP 8.2 | Two weeks to go back |
| Kreativmedia | Automatically the next higher default version; a website that isn’t compatible may go down | “Webhosting Custom” option with PHP 7.4 to 8.3 on a separate system, CHF 4.00 per month |
| HOSTFACTORY | Without a response, automatic move to the paid LegacyPHP; the website keeps running | No outage, but additional licenses at CHF 1.45 per domain account per month |
The rules of the other Swiss hosting providers are in the article PHP end of life. What your hosting provider tells you is binding. A way back to the old PHP version is always temporary: it buys time for the upgrade, but it doesn’t replace it.
Only a backup left: can the application run again?
Sometimes all that’s left of an application is a backup: the hosting has been canceled and the application switched off. It can be brought back into operation if the backup is complete, meaning it contains code, database, uploaded files and configuration. You also need a server with a PHP version the code runs on. If that is a version without security updates, it only works as a bridge until the upgrade.
Once the contract has ended, only the contracting party can request a backup from the hosting provider. If the hosting was in the name of your former developer or the agency, they have to request it; how to get them to do so is in the immediate actions when the developer can’t be reached. Ask as early as possible, because hosting providers only keep backups for a limited time. Whether the backup is enough and what’s missing for a restart is shown by the Takeover Assessment from Unique-P. If it’s urgent, the emergency fix helps.
An emergency doesn’t have to be about PHP
If your application goes down while hosting providers are switching PHP versions one after another, PHP is the obvious suspect. An example from my own work shows why the log comes first: on a large TYPO3 website with quite a lot of custom development, the login was broken, and the previous service provider couldn’t get the problems under control. The first analysis was ready within an hour of the call. The cause was the login itself, which runs through the customer’s ERP: not a hack and not a PHP update. As soon as the access was available, a first repair followed, and the website was running again that same afternoon. After the stabilization came the overdue upgrade of the TYPO3 website from version 8 to 12, in about four months.
Two things apply to every application outage: look for the cause in the error log instead of changing the PHP version on a hunch. And fast help depends on access, which is why access belongs to your company, organized and at hand.
What happens after the emergency?
Once the application runs again after the PHP switch, your hosting provider’s deadline for the old PHP version is still running too. How big the step to a supported version is, is covered in the article PHP upgrade; which dates are coming up next is in the end-of-life calendar.
If nobody knows the application anymore, the Takeover Assessment from Unique-P shows what the PHP upgrade needs, with a fixed price for the implementation. After that, ongoing maintenance keeps PHP and packages up to date on a fixed schedule, so the next switch doesn’t bring another blank white page.
Sources
- [1]Migrating from PHP 8.5.x to PHP 8.6.x, Backward incompatible changes · php.net
- [2]Migrating from PHP 7.4.x to PHP 8.0.x, Backward incompatible changes · php.net
- [3]Migrating from PHP 5.6.x to PHP 7.0.x, Removed extensions and SAPIs · php.net
- [4]Migrating from PHP 7.1.x to PHP 7.2.x, Other changes (MCrypt) · php.net
- [5]mysql_connect · php.net
- [6]get_magic_quotes_gpc · php.net
- [7]Runtime Configuration, display_errors · php.net
- [8]php-src, Zend/zend_execute.c (Meldung «Call to undefined function») · PHP-Projekt, GitHub
- [9]Composer Config, platform-check · Composer
- [10]Composer, AutoloadGenerator (Text der Plattformprüfung) · Composer, GitHub
- [11]PHP · Onlime
- [12]Deaktivierung PHP-Versionen · Kreativmedia
- [13]HOSTFACTORY LegacyPHP · HOSTFACTORY