Introducing EasyApache’s Optimal Profiles

ScottTh

Well-Known Member
Jan 28, 2013
157
2
18
Houston, TX
cPanel Access Level
Root Administrator
Thank you all for your helpful feedback about ITK and its rollout. We are gathering up your ideas in order to decide what changes we need to make. That could mean a change to the PHP handler order, documentation updates, or both.

We will update this thread when we have a completed our research and have a solution at hand.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
Hmm, after compiling with the ITK profile, at the end of EasyApache the PHP handler is set to cgi. Shouldn't this default to DSO? Should I set it to DSO?

Or am I wrong in assuming that? Elsewhere in documentation it says that compiling with ITK will set your handler to CGI if you select ITK in the short options list. Not sure what that would matter.

Which is correct?

Thanks,

Mark
I've noticed that sometimes when you run EasyApache it doesn't always set the handler. For example, when I switched back to suPHP from DSO, the handler remained at DSO and I had to manually change it.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I asked the same question in a cPanel ticket. Here was the reply:

I would recommend that you update your handler and I believe that DSO with mod_ruid2 would be a good handler for the MPM ITK Profile.
???
Using DSO as the PHP handler should work well with MPM ITK, equivalent to using DSO with RUID2, but not both ITK and RUID2 simultaneously. What was your ticket number?
 

KurtN.

Well-Known Member
Jan 29, 2013
95
1
83
cPanel Access Level
Root Administrator
When I used the ITK profile it set the PHP handler to DSO automatically.

I'm scrapping this idea. I've just looked at the compatibility matrix on the CloudLinux website and it shows if you use ITK, or Ruid2 there is no memory limiting functionality, or PHP selector.
Apache 2.2 and 2.4 comes with the following per-virtualhost configuration directives to ensure applications running under it do not violate memory and process limitations:
 

KurtN.

Well-Known Member
Jan 29, 2013
95
1
83
cPanel Access Level
Root Administrator
A customer has pointed out that since we switched to this MPM they are unable to get anything returned when using $_ENV

For example,
PHP:
echo $_ENV["DOCUMENT_ROOT"];
Returns nothing

But, using getenv works fine.


PHP:
$root = getenv("DOCUMENT_ROOT"); 
 Echo $root;
Edit: wanted to add that the php.ini setting "variables_order" is set correctly on this server to include "E" - the most common reason the ENV array comes up empty is because this is missing - so I wanted to clarify that this is not the problem here.

I'm hoping someone could take a couple of minutes to reproduce this issue.
This is not an artifact of the Apache MPM ITK.

When running PHP with the DSO handler, the DOCUMENT_ROOT variable isn't contained in the $_ENV array. Instead, it's under the $_SERVER array. Conversely, when running PHP with the CGI handler, the DOCUMENT_ROOT variable is in both $_ENV and $_SERVER arrays.

This is a development issue in the wild that is commonly brought up by PHP developers.

For more information, please read PHP's web page located: here.
 

patchwork

Well-Known Member
Nov 2, 2001
95
0
316
I must admit I was disappointed when I logged in to see the profiles, I was expecting more of them.

I would like to have seen a few profiles such as

Apache 2.2 + php5.4 + xcache + best security
Apache 2.4 + php5.5 + opcache + best security

Maybe even have a profile wizard that selects compatible options, something like

step 1 -- select apache version
step 2 -- select php version
step 3 -- do you want a php cache? the compatible options are, xcache, opcache .....
step 4 -- the best compatible security for this setup is Mod Ruid2
step 5 -- based on your selections we suggest MPM Prefork

After finishing we suggest you select the PHP 5 Handler DSO, and enable Apache suEXEC.

I've recompiled Apache a lot of times trying to get a good php/cache/security setup.


Pete