Michael Legg

Well-Known Member
Mar 2, 2015
90
6
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
I'm trying to transition from PHP 7.4 to 8.1 and I've installed both versions via WHM. But when I switch any of my sites to use 8.1 they just display an Apache 500 error.
Not even a simple <?php echo('Hello World'); ?> will load, so it's not a PHP code issue.
The 500 error doesn't even appear in the domain's error log for some reason.
I notice that WHM changes my .htaccess file and adds "AddHandler application/x-httpd-ea-php81 .php .php8 .phtml"
If I remove this the site works again, but phpinfo reports that it's version 7.4

So it's as if the 8.1 installation didn't actually work.

Does anyone have any tips on where to begin trying to work out whats going on without any error messages or logs?
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
574
266
138
IN
cPanel Access Level
Root Administrator
Try to reinstall the php8.1 and its extension from EasyApache 4
 

Michael Legg

Well-Known Member
Mar 2, 2015
90
6
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
Thanks for the idea.

I've done that, now interestingly, 80% of my sites are down whether they run 7.4 nor 8.1.

I can get static html pages to load from external domains though.

This is bizarre!

I'm still faced with the problem of finding out what the problem is without having any meaningful error messages, but I'm wondering if there's a problem in the Apache config files.
 
Last edited:

Michael Legg

Well-Known Member
Mar 2, 2015
90
6
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
Okay ... I found the error ...

PHP Fatal error: Unable to start standard module in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php74
PHP Fatal error: Unable to start standard module in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php81

No idea why it does this on some sites and not others, or what to do about it, but I'll just keep Googling.
 
Last edited:

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
574
266
138
IN
cPanel Access Level
Root Administrator
I would suggest you open a ticket to the cPanel team or seek assistance from a qualified system administrator for this issue.
If you do not have such an administrator, you can try to reach the certified System Administrator here.
 

Michael Legg

Well-Known Member
Mar 2, 2015
90
6
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
I think I should change the title of this thread to "Easy Apache Doesn't Install PHP 7.4+ Properly".

After rolling back to 7.3 which worked perfectly, I thought I'd try 7.4 on it's own because I speculated that having multiple version was the problem. Alas, even on it's own 7.4 did not work.

The bottom line is that I still need to upgrade to al least 7.4 to ensure security patches are released. Is there a way I can do this without using Easy Apache or will that break cPanel?
 

Michael Legg

Well-Known Member
Mar 2, 2015
90
6
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
I rebooted the server and was able to install PHP 7.4 and all sites are running on it now.

The problem was that there were updates that required a reboot in order to complete their installation and I didn't know because in the new interface the notifications are hidden whereas in the old interface there was a big message displayed at the top of the screen that the server needed a reboot. Now that I know this, I'll have to regularly check the notifications to see if a reboot is required. (After using the old interface for 20 years, it takes old guys like me a while to get used the new-fangled stuff)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
I'm glad you were able to get the issue resolved. I believe the issues mentioned here would also help with the visibility of the reboot notifications:

 

InternetTim

Member
Aug 15, 2014
5
2
53
cPanel Access Level
Website Owner
One thing that I noticed on my server, was a lot of clients are using templates for their WordPress, and they are only able to go up to PHP 7.4 at the time I wanted to upgrade to PHP 8.1. So I have to wait, and do more research for what they are using (which takes a lot of man power searching). Luckily I can only update a few at a time, until these other companies, get it to groove!
 
  • Like
Reactions: cPRex