Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jan 2006
    Posts
    142

    Default suPHP modify php config per account if php.ini config is disallowed in user account

    If you configure [phprc_paths] to force loading php.ini from specified location is there a way to somehow modify php configuration for each user, maybe in apache user includes or something else...?

    I read all threads about suphp here and couldn't find what I am looking for...

    That would be the best and most secure way for suPHP, but I don't see how can this be accomplished...

  2. #2
    Member
    Join Date
    Aug 2008
    Location
    Uruguay
    Posts
    55
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    If you have suPHP installed you can create a php.ini for each user, the user will use his specific php.ini settings instead of the server wide settings.

    Eg.

    You have some disable_functions server wide, but you have a client that needs one of those functions enable, you create a php.ini at the directory where it's needed (eg. /public_html) (guys correct me if I'm wrong but I think that the php.ini won't be recursive). Then you declare in it the disable_functions variable and set all the functions except the one you need.
    When the site checks the disable_functions, will read the local php.ini instead the server wide.

    If I do not misunderstand, this could help you.
    Keep in mind that suPHP won't accept 777 directories.

  3. #3
    Member
    Join Date
    Jan 2006
    Posts
    142

    Default

    I know all that, but that was not my question....

    That is exactly what we wan't to prevent... We don't wan't users to be able to modify php configuration, and if php.ini is in their home directory thay can do what ever they want with it...

    I would like to prevent users to modify php.ini configuration, and that thay have to request from us any php configuration modification but if we prevent php.ini in user directories with [phprc_paths] in suPHP configuration than it looks like there is no way to alter php configuration per user in any way...

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

    Default

    Well, it looks like there is no specific way once you enable phprc_paths. You can uncomment the application lines in the suphp configuration files to force users to use the php.ini from those directories and you can try adding your own php.ini files there with different settings.

  5. #5
    Member
    Join Date
    Jan 2006
    Posts
    142

    Default

    It's really bad, if there is no way to protect php configuration and don't allow user to go to default php configuration just by adding empty php.ini file...

    If you force specific php.ini configuration by phprc_paths than there is no way to alter configuration per user...

    How can one choose between those two bad options...

    Is there some other way to prevent users to use php.ini without phprc_paths that can also allow us to alter configuration per user?

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    1,118

  7. #7
    Member
    Join Date
    Jan 2006
    Posts
    142

    Default

    Thank you very much... Thats exactly what I was looking for.

    The worst thing is that I already read all your posts about this, but obviously not very carefully, and I somehow overlooked the <Location /> hack in your post, so that was the only thing that I missed here...

    Thanks again...

Similar Threads & Tags
Similar threads

  1. php.ini end user config
    By gr8support in forum Feature Requests for cPanel/WHM
    Replies: 18
    Last Post: 01-25-2012, 03:28 PM
  2. Replies: 12
    Last Post: 07-18-2011, 02:10 PM
  3. [suPHP] one php.ini for each cpanel user?
    By colorcloud in forum Security
    Replies: 4
    Last Post: 12-29-2009, 02:44 PM
  4. [suPHP] one php.ini for each cpanel user?
    By colorcloud in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-11-2009, 07:56 AM
  5. Replies: 6
    Last Post: 12-10-2009, 12:43 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube