Changed Account To PHP8 and the Email Account Was Deleted

WorkinOnIt

Well-Known Member
Aug 3, 2016
302
53
78
UK
cPanel Access Level
Root Administrator
As the title says, I today added PHP 8 to the server via Easy Apache4.

I believe I added all the correct modules etc. However, it seems the email account was no longer able to send email. On closer inspection, the email account is not there anymore.

Luckily, this was not a critical account and I had only limited the PHP change to one server and one account in order to test (glad I did!)

However, I am keen to ensure this doesn't happen to other accounts going forwards. What could have caused this? I do recall that on the first load up of PHP 8 via EA4, I had not enabled all the mail modules. Would that have resulted in the deletion of the mail account ?
 
Last edited by a moderator:

WorkinOnIt

Well-Known Member
Aug 3, 2016
302
53
78
UK
cPanel Access Level
Root Administrator
Just to add to the above: I discovered the error in the error log "Incorrect authentication data" - which lead me to discover the email account was not actually there (but all of my email forwarders had remained intact)

Also, when I go to cpanel > Mail > Check Mail (via RoundCube), I get


DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
965
358
63
EU
cPanel Access Level
Root Administrator
Changing PHP won't remove any email accounts. As you said in your previous post that account might have been a forwarder only? rather than a mailbox. In any way cPanel won't touch forwarders or emails while changing the PHP version.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,139
2,406
363
cPanel Access Level
Root Administrator
I agree with @andrew.n - there isn't any connection between the PHP version and an email account, so that isn't likely to be what triggered the issue.

I'm also a bit confused on exactly what you were seeing. The guide you linked mentioned has the user reset the password from the cPanel >> Email Accounts menu, but if the account didn't exist you would not have been able to do that. If you have additional details on where the account was not showing up that may help us provide you with better information.
 

WorkinOnIt

Well-Known Member
Aug 3, 2016
302
53
78
UK
cPanel Access Level
Root Administrator
Hi both,

Some background info: I'm the only user with access to the server which is a KVM and using the latest whm version and latest kernel.

Unfortunately I did not take screenshots during this exercise, however here is a breakdown of steps taken: hopefully this could be helpful in diagnosing how the fault occurred?

The account, let's call it "exempleA", was using php-fpm and PHP 7.4. And it had 3 email accounts set up, plus 3 related forwarders to Gmail. They were all working good.

On the server, via easyapache4, I added PHP 8 and all the same modules that I used for PHP. So far so good.

Then in whm, I selected php8 for the account and left php-fpm selected.

Next, I debugged ExampleA website which had a few errors due to the update to PHP 8, I chose to use cpanel / customer level, to switch backwards and forwards on the PHP version, via the PHP version selector. I also had a play with PHP.ini to modify values to suit etc.....

Next, in Gmail, I started to get an authentication error for all three email accounts, despite none of them being changed. When I went to ExampleA cpanel mail section, the three email accounts were not visible.

in File manager, the mail accounts were still visible, but as they were all forwarding to Gmail, they did not have any email stored on the server.

So the accounts hadn't gone completely, but we're not showing in the cpanel > email section.

The only mail account showing there was the the default account. I clicked 'manage account' on the default and selected roundcube, and that is when I discovered the roundcube database connection error. So, I'm guessing somehow roundcube SQL error has occurred during the addition of php8, or the modules, or it's a random coincidence?

In cpanel mail section I added one of the email accounts back in and that solved the problem with roundcube, so I did the same with the others.

All working again now, and luckily this accounts emails were not too critical, and had all been downloaded in Gmail anyway, so nothing really lost, just concerned for the issue.

I have 3 other servers and many accounts on those and also wanted to add php8, but I don't want to have this issue on there.

However, now I'm aware of this issue, I can look out for it. And the reason for the post here was a) to highlight the issue and b) to see if there is a common explanation for this error.
 
Last edited: