The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by kitivaruni, Apr 12, 2011.

  1. kitivaruni

    kitivaruni Member

    Joined:
    Sep 23, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    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. :)
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  3. JayFromEpic

    JayFromEpic Well-Known Member

    Joined:
    Apr 2, 2011
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Scottsdale, AZ
    cPanel Access Level:
    Root Administrator
    I also think there is a setting somewere, cant remember were off the top of my head, that allows the accounts owner to edit the php.ini. Its a check box to allow it or block it. Most block it as its a secuirty risk.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  5. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    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:
    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
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  7. NetMantis

    NetMantis BANNED

    Joined:
    Apr 22, 2012
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    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.
     
  8. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Can you share it here public?
     
Loading...

Share This Page