Easy Apache 4 using DSO with older version of php?

scobiit

Member
Sep 24, 2014
19
0
1
cPanel Access Level
Root Administrator
Hi all,

We have just made the jump to easy apache 4 and are trying to find our way around the new interface. We have a couple of customers that wish to run cs-cart installations with us and we have been told by cs-cart that DSO is the preferred handler however changing the handler on the main version of php causes all of the wordpress based installations to stop working.
What I thought was I can use php55 for the cs-cart installations and enable DSO for php55 only however I only have the option to enable DSO for php56. How can I change this? I read that you can only use one version of DSO at a time but haven't found any other information on the matter?

Thanks in advance
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Hi,

If via the MultiPHP Manager -> PHP Handlers, if you only see 'DSO' available for PHP 56, that means only the PHP56 DSO package is installed. You can remove it via yum (yum remove ea-php56-php) and add the PHP 55 DSO package (yum install ea-php55-php). Once you do this, DSO for PHP 55 will show as available.

I hope this helps!
 

UHLHosting

Well-Known Member
Sep 26, 2014
58
5
58
Bratislava
cPanel Access Level
Root Administrator
Twitter
perl-DBD-MySQL-4.023-5.el7.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
[email protected] [~]# yum install ea-php56-php --skip-broken
Loaded plugins: fastestmirror, remove-with-leaves, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 85.13.201.2
* base: centos.quelquesmots.fr
* epel: mirror.inode.at
* extras: miroir.univ-paris13.fr
* ius: mirror.amsiohosting.net
* updates: centos.weezel.co.uk
Resolving Dependencies
--> Running transaction check
---> Package ea-php56-php.x86_64 0:5.6.19-1.2 will be installed
--> Processing Dependency: ea-apache24-mpm = forked for package: ea-php56-php-5.6.19-1.2.x86_64
--> Running transaction check
---> Package ea-apache24-mod_mpm_prefork.x86_64 0:2.4.18-5.1 will be installed
--> Processing Conflict: ea-apache24-mod_cgid-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_prefork
--> Processing Conflict: ea-apache24-mod_mpm_worker-2.4.18-5.1.x86_64 conflicts ea-apache24-mpm = forked
--> Processing Conflict: ea-apache24-mod_mpm_worker-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_prefork
--> Processing Conflict: ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 conflicts ea-apache24-mpm = threaded
--> Processing Conflict: ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_worker

Packages skipped because of dependency problems:
ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 from EA4
ea-php56-php-5.6.19-1.2.x86_64 from EA4
[email protected] [~]#
 

scobiit

Member
Sep 24, 2014
19
0
1
cPanel Access Level
Root Administrator
Thanks CPJacob!
It's been a while since I have had to make any modifications to Apache/ PHP via the terminal.

Hopefully you would be able to answer another quick question for me.
I have a bit of a conflict I'm not sure how to directly resolve with EasyApache 4. On the server I have run both the Cpanel Security Advisor and the one built in to CSF and using Easyapache 3 I'm able to satisfy all the entries. Using EasyApache 4 however depending on the configuration I go with I either have the security advisor warning me about "no Apache symlink protection" or CSF warning me that "modsecurity" and "suexec" aren't enabled/ installed. Is there a combination of modules I can use with EasyApache4 (and still keep DSO/CGI) that will satisfy both?

Thanks again
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
perl-DBD-MySQL-4.023-5.el7.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
[email protected] [~]# yum install ea-php56-php --skip-broken
Loaded plugins: fastestmirror, remove-with-leaves, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 85.13.201.2
* base: centos.quelquesmots.fr
* epel: mirror.inode.at
* extras: miroir.univ-paris13.fr
* ius: mirror.amsiohosting.net
* updates: centos.weezel.co.uk
Resolving Dependencies
--> Running transaction check
---> Package ea-php56-php.x86_64 0:5.6.19-1.2 will be installed
--> Processing Dependency: ea-apache24-mpm = forked for package: ea-php56-php-5.6.19-1.2.x86_64
--> Running transaction check
---> Package ea-apache24-mod_mpm_prefork.x86_64 0:2.4.18-5.1 will be installed
--> Processing Conflict: ea-apache24-mod_cgid-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_prefork
--> Processing Conflict: ea-apache24-mod_mpm_worker-2.4.18-5.1.x86_64 conflicts ea-apache24-mpm = forked
--> Processing Conflict: ea-apache24-mod_mpm_worker-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_prefork
--> Processing Conflict: ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 conflicts ea-apache24-mpm = threaded
--> Processing Conflict: ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 conflicts ea-apache24-mod_mpm_worker

Packages skipped because of dependency problems:
ea-apache24-mod_mpm_prefork-2.4.18-5.1.x86_64 from EA4
ea-php56-php-5.6.19-1.2.x86_64 from EA4
[email protected] [~]#
As the error states, this is happening because you're trying to install a DSO package when you're using a threaded MPM. This won't work, as DSO requires a forked MPM. DSO required the prefork MPM.
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Thanks CPJacob!
It's been a while since I have had to make any modifications to Apache/ PHP via the terminal.

Hopefully you would be able to answer another quick question for me.
I have a bit of a conflict I'm not sure how to directly resolve with EasyApache 4. On the server I have run both the Cpanel Security Advisor and the one built in to CSF and using Easyapache 3 I'm able to satisfy all the entries. Using EasyApache 4 however depending on the configuration I go with I either have the security advisor warning me about "no Apache symlink protection" or CSF warning me that "modsecurity" and "suexec" aren't enabled/ installed. Is there a combination of modules I can use with EasyApache4 (and still keep DSO/CGI) that will satisfy both?

Thanks again
With EA4, there is no Apache symlink protection. The patch that is provided with EA3 doesn't really do anything, as there is still a TOCTOU race condition with this patch. If you're interested in using the symlink patch, you'd need to provide your own distribution of EA4 with that patch added. We recently talked about the Apache symlink patch on the EDGE-Users mailing list. Here's some info from that:

--------------------
We have no plans to include the Symlink protection patch into our EasyApache 4 stack. There’s a couple of different options you can take to get that patch:

  1. Build & distribute your own version of EasyApache 4.
    1. Our sources for EasyApache 4 are located here: cPanel, Inc. · GitHub
  2. We have worked with Brad at GRSecurity for a while and he’s been building out kernels for CentOS 5 and CentOS 6 that include this patch: Index of /cpanel-images
    1. These kernels aren’t fully up to date, however there is a patch in that directory that you can use to patch your own kernels.
--------------------