Is possible to set individual PHP config for each Cpanel Linux user?

kitivaruni

Member
Sep 23, 2010
18
0
51
Dear Sir, :D

As subject, is possible to set individual PHP config for each Cpanel Linux user in a same linux server? :confused:

Thank you. :)
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you are using suPHP, then you can copy the existing php.ini in /usr/local/lib/php.ini to each user's account. You can also set up that php.ini to be used as a default that would copy to any new accounts if you place a copy of it in /root/cpanel3-skel/public_html location, since these files are copied into new accounts.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I'm not aware of any setting that allows an individual php.ini to be edited or not edited by individual account owners. Since DSO doesn't allow individual php.ini files and handles the settings in .htaccess directives, and since CGI and FCGI have different methods to enable individual php.ini files, it would only work with suPHP to place a php.ini onto the account without further configuration required (such as CGI and FCGI need for individual php.ini to work).

As such, it wouldn't be possible under 4 differing scenarios for how a php.ini can be handled based on the PHP handler to allow the file to be edited or not by individual account users, since in some instances editing it wouldn't do anything.

Also, there is no setting to allow global editing of the php.ini file by non-root level WHM users. In WHM, there is a PHP Configuration Editor that edits the global php.ini file, but only the root user or any reseller with root WHM level access can edit it.
 

luigidelgado

Well-Known Member
Nov 6, 2010
119
5
68
Mexico
cPanel Access Level
Root Administrator
Twitter
Tristan,

I want to run FCGI in our servers to increase performance. We have lots of accounts. I cant make 100s accounts with this: http://forums.cpanel.net/f5/individual-php-ini-files-php-fcgi-php-cgi-160398.html (that would work for one new account on an alredy working FCGI server).

So two questions:
1. Is there a way to configure post_virtualhost_global.conf to read individual php.ini's?
2. Here:
You can also set up that php.ini to be used as a default that would copy to any new accounts if you place a copy of it in /root/cpanel3-skel/public_html location, since these files are copied into new accounts.
is at least then possible to copy in that folder the cgi-bin/php.ini and cgi-bin/php.fcgi files needed on each new account so new accounts can work with individual php.ini files under FCGI?

Thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Yes, it is possible to do that for new accounts, although it would be better to use a /usr/local/cpanel/scripts/postwwwacct script to put the right entries into the files, since they will differ for path based on the username.
 

NetMantis

BANNED
Apr 22, 2012
116
1
66
Utah
cPanel Access Level
DataCenter Provider
Just for the record, I can set that up easily without the need for either method and preferably without sacrificing security as is the case of both of the above methods of customizing PHP.INI at a per user level.

If anyone really has the need for any of that, I could help them with setting that up.