Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    27

    Default [suPHP] one php.ini for each cpanel user?

    Dear all,

    I'm wondering if I can make each user to have only one php.ini file, and that php.ini is outside user's home directory, so only admin can edit that php.ini for user?

    PS. handler=suphp & suEXEC=on

  2. #2
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,050

    Default

    You can create a php.ini as root under the user's account so he won't be able to create a new one as well as edit the one you placed.

    OR

    to completely disable permissions for users to create their own php.ini and manage them from outside their home directories, refer the post by "sparek-3" at: http://forums.cpanel.net/f5/how-can-...hp-127537.html
    Last edited by madaboutlinux; 12-11-2009 at 07:02 AM.

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor.
    Join Date
    Dec 2009
    Posts
    177
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    In a text editor (nano, vi etc) open the file - /opt/suphp/etc/suphp.conf

    search for [phprc_paths]
    there uncomment the following lines :

    ;application/x-httpd-php=/usr/local/lib/
    ;application/x-httpd-php4=/usr/local/php4/lib/
    ;application/x-httpd-php5=/usr/local/lib/

    save and quit.

    restart apache. you are done, now regardless of php.ini at their home folders, all users will be forced to use php.ini at the above paths .

  4. #4
    Member
    Join Date
    May 2005
    Posts
    12

    Default

    Quote Originally Posted by colorcloud View Post
    Dear all,

    I'm wondering if I can make each user to have only one php.ini file, and that php.ini is outside user's home directory, so only admin can edit that php.ini for user?

    PS. handler=suphp & suEXEC=on
    put the php.ini file for each use in their home directory e.g.
    Code:
    /home/user
    and then in the http folder for that user
    Code:
    /home/user/public_html
    insert the following line into the htaccess

    Code:
    SetEnv PHPRC /home/user
    and you should be set

  5. #5
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default

    Quote Originally Posted by IbnKuldun View Post
    put the php.ini file for each use in their home directory e.g.
    Code:
    /home/user
    and then in the http folder for that user
    Code:
    /home/user/public_html
    insert the following line into the htaccess

    Code:
    SetEnv PHPRC /home/user
    and you should be set

    Users can change htaccess so its not a good idea. If they delete that from the htaccess file then they can override the php.ini setting

Similar Threads & Tags
Similar threads

  1. php.ini / suphp / suhosin
    By gsus in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-02-2010, 09:00 AM
  2. Option to force restriction of per-user php.ini when using suphp
    By mtindor in forum Feature Requests for cPanel/WHM
    Replies: 10
    Last Post: 03-25-2010, 12:28 PM
  3. [suPHP] one php.ini for each cpanel user?
    By colorcloud in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-11-2009, 06:56 AM
  4. Replies: 6
    Last Post: 12-10-2009, 11:43 AM
  5. Replies: 6
    Last Post: 12-10-2009, 11:43 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube