Upgrading to php7.4 causes white screen

Hi there.

I’m installing an extra which requires php 7.4 or higher.

I an running Modx 3.03 on php 7.3.

I changed the version to 7.4 in cPanel - but I just get a white screen of death!

Change back to 7.3, and all back to normal.

I’ve emptied the core/cache directory.

I can’t see anything in the error log to indicate the issue.

Any tips?

Thanks
Andy

Have you checked that all required PHP extensions are still enabled when you change to 7.4?

The following extensions are required by MODX, or are commonly required by extras: zlib , json , gd , pdo (specifically pdo_mysql ), imagick , simplexml , curl , and mbstring .

Thanks for your input.
To be honest, I don’ t know where to check this in cPanel.
I will contact the hosting company to see if they can tell me.

I just turned on display_errors in the php.ini and got this:

 Fatal error: Uncaught Error: Class 'PDO' not found in /home/site/dev.site.co.uk/core/src/Revolution/modX.php:500 Stack trace: #0 /home/site/dev.ajcarart.co.uk/core/src/Revolution/modX.php(449): MODX\Revolution\modX->loadConfig('/home/site...', Array, Array) #1 /home/site/dev.site.co.uk/index.php(41): MODX\Revolution\modX->__construct() #2 {main} thrown in /home/site/dev.site.co.uk/core/src/Revolution/modX.php on line 500

So does this mean pdo_mysql is not installed?

Strange if it was fine on php7.3 though?

cPanel can be configured in various different way so it’s not always a consistent experience between different users.

For me:

And then:

If you don’t see that - or any other links to PHP Extensions - then you may need to contact your hosting partner.

Hope that helps.

Ah yes I can see that now - but all the required extensions are ticked.
Speaking to the hosting company now…

1 Like

I assume you’ve tried deleting all files in the core/cache directory.

One other thing you could try is visiting with your browser in private or incognito mode to make sure it’s not a browser cache issue.

Yes I did Bob.
After chatting with the hosting company it turned out to be caused by the wrong version of php7.4!
I originally use alt-php74 which is associated with the CloudLinux PHP selector.

They suggested is Use ea-php74 via MultiPHP Manager in CPanel, and it worked fine.

Not sure why why - but that was the solution!

And there’s me thinking php is php!

Leaving this here as the solution on the off-chance someone else has the same issue

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.