Upgraded to EA4 - error with multiPHP Manager when changing php version

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Just updated to EasyApache 4 for various reasons, but mainly to use php 7. Upgrade went fine and I provisioned a custom profile fine. I'll note at this point that the cpanel docs say there is a way to save your profile during the process, but there isn't. I see nowhere in EA4 to save a profile - only download, customize, provision. I do see my saved profile from EA3 listed though.

On to the problem... after the above I went to the MultiPHP Manager. I have php 5.6 as the system default and wanted to try php 7.1 on one of my domains (my own way to test some things to make sure my code is okay). I received the following error :

popup shows :
Failed to apply PHP version “ea-php71” to the selected domain. For more information, check the error message at the top of the page.

top of page shows :
Error: (XID tkpffe) The system failed to apply the “PHP” version to “mydomain.com”: Cpanel::Exception::MissingParameter=HASH(0x6214b38)

In the above I have replaced my domain name.

So what gives here? What is the problem and how can I correct that?

EDIT : I'll add to this that my .htaccess file for this and all other domains I've tried to change to php 7.1 are 0644 permissions. I found a few other posts saying that permission were a problem, but they are correct in this case - owner and group are the domain username too.
 
Last edited:

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Okay, I looked at this some more... the php 7.1 executable was missing which is why I could not set 7.1 through multiphp manager. So, I modified the profile and went to provision again... at the review stage it tells me it would be removing multiple modules from 5.6 if I installed 7.1.

So, rather than adding 7.1 I tried adding 7.0. This worked fine - the review section was not uninstalling anything and now I can change any of my domains to php 7 with multiphp manager.

So, I guess my question now is - why can't I have php 5.6 and 7.1 installed at the same time, but 5.6 and 7.0 are fine? Can 7.1 only be installed by itself or is there a compatibility problem? I would think there would be some sort of notice while going through this process if there were circumstances preventing it.

Any information on this one would be really helpful and appreciated. Thank you ahead of time!
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
... and more information. I have php 7.0 set on a single domain.

The following was added to the htaccess of the domain when doing this :

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit​

and php does not work. Testing something simple like :

<?php
echo 'testing this';
?>​

gives the following error :

PHP Parse error: syntax error, unexpected ''testing this'' (T_CONSTANT_ENCAPSED_STRING) in *my file path*​


What the heck? So far this seems anything, but a click and done process as it appears to be. One thing after another.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Now 7.0 works out of nowhere... I guess there is something else happening behind the scenes and there is a delay for the switch.

Still want to know about using 5.6 and 7.1 together though. Information would be great.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Still want to know about using 5.6 and 7.1 together though. Information would be great.
Hello,

I'm unable to reproduce any issues with installing PHP 7.1 and PHP 5.6 on EasyApache 4. I successfully installed PHP 7.1 via the following command:

Code:
yum install ea-php71
I then browsed to "cPanel > MultiPHP Manager" and successfully switched an account from PHP 5.6 to PHP 7.1. Could you try reinstalling PHP 7.1 via the "yum reinstall ea-php71" command and let us know if that helps?

Thank you.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
I was not using yum through command line - I was using EA4 within WHM.

Basically what I ended up doing is installing 5.6 and 7.0 which worked and did not remove selections I made on the review page and provisioned correctly. Afterwards I checked my code to make sure no updates were needed for my php scripts. Everything was fine.

Afterwards I repeated the above process, but this time only installed php 7.1 in EA4 (uninstalled the older versions) which worked as well.

I have no doubt using yum from command line would have worked, but I was using EA4 in WHM. Things looked fine, but when you get to the review part it wasn't installing all of my selections and/or removing selections I didn't want removed. My workaround to this was what I mentioned above.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Things looked fine, but when you get to the review part it wasn't installing all of my selections and/or removing selections I didn't want removed. My workaround to this was what I mentioned above.
It's possible you were enabling modules that conflicted with one another. Feel free to let us know if you experience any additional issues and we can help walk you through the process.

Thank you.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
Same modules for php 5.6 and 7.0 and they installed fine.
Same modules for php 5.6 and 7.1 and it would not allow it (would make changes on the review step removing things and so on).

In the end I found the only way to get the modules I wanted with php 7.1 was to make it the only php version installed. Again, this is using EA4 within WHM and not using yum with command line.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

What PHP handler were you using for the existing PHP versions when attempting to install PHP 7.1? For instance, it's only possible to use DSO with one version of PHP at a time.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
For instance, if you tried to enable all three PHP versions through WHM right now, do you still encounter any issues?

Thank you.
 

morrow95

Well-Known Member
Oct 8, 2006
189
12
168
At the moment I only have php 7.1 installed, but I tried this for you.

Went to EA4 and kept everything the same, but added php 5.6 and its modules (the exact same modules I currently have for 7.1). The 'review' step correctly says I will be adding them and nothing will be removed. I did not provision this of course as I have no need to now.

This is not what happened to me countless times the other day. If it is worth anything I will list the scenario again :

- I just finished upgrading to EA4 (I was using EA3 prior)
- I had Apache 2.4 and php 5.6 installed already from before... I used EA4 to add php 7.1 (exact same modules that were already selected for 5.6)
- I get to the review section and it would modify what I had selected (uninstalling 5.6 modules, not installing all of the 7.1 modules, and so on - I did not write this down so I can't give you specifics). I started the process over more than a few times and the same thing happened every time.
- I tried the exact same thing, but with php 7.0 instead (worked fine)
- I still had 5.6 as the 'system default' or whatever you call it in multiphp manager and I set php 7 to a single domain to test some code of mine.
- I provisioned a second time around this time uninstalling php 5.6 and 7.0 and installing 7.1 - it worked
- my current profile now is php 7.1 only

I accomplished the end goal I wanted to, however, I had to go about it a strange way and spend extra time doing so. My original intention was simply adding 7.1 onto the already installed 5.6 so I could test 7.1 on a single domain and that was not possible with what happened and how I described above.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

It's difficult to know for sure what resulted in the package conflicts without seeing a copy of the modules that were scheduled for removal during the provision(e.g. suphp, ruid2). However, feel free to let us know if you encounter any additional issues.

Thank you.