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.

PHPSuExec and Php.ini

Discussion in 'General Discussion' started by asterisk, May 20, 2006.

  1. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I've discovered to change some settings for PHP (normally in .htaccess if not using PHPSuExec), I have to put a php.ini file in that directory.

    The tedious part seems to be that I also have to put the same php.ini with those changes in every subdirectory below that. Is there a quicker way to do that please - (as there are quite a lot of them)?

    Did you guys have to put it in every subdir as well?
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Yes. I'm not sure if there is any other option.
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,380
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    As far as I know, this is the only way to make changes with phpSuExec. A couple of bugzilla enhancement requests that refer to this:

    http://bugzilla.cpanel.net/show_bug.cgi?id=3756
    http://bugzilla.cpanel.net/show_bug.cgi?id=3984

    And to some extent this request would apply:

    http://bugzilla.cpanel.net/show_bug.cgi?id=3209

    That last one really only applies if you want to install something like suPHP yourself, without any CPanel support. You have to edit the VirtualHost Template in order for it to work properly.
     
  4. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, relief to know I'm not the only one. Misery loves company. :)

    I very much like the first idea posted and perhaps with more flexibility, say, enabling for anything below a certain directory level instead of per user account.

    While waiting for cPanel to implement that, I've just thought of using a master php.ini file in the uppermost directory and symlinks (ln -s <path>) for all below it.

    For copying those symlinks, wondering if there's a script out there that copies them into all subdirectories below a certain path that contain .php files.
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,380
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You might try something like the following:

    1. Place a customized php.ini file in an account's home directory (i.e. /home/user/php.ini)
    2. Then run the following:

    find /home/user/public_html -type d -exec ln -s /home/user/php.ini {} \;

    Note that you have to give the full path of the customized php.ini file and you want to use /home/user/public_html as your starting point. The above command finds all directories under the public_html folder and then creates a symbolic link to the php.ini file in the user's home directory in all of those directories. (Note, change user with the actual username of the account).

    A word about the enhancement requests listed (and this applies to all enhancement requests). Just because an issue has a listing in bugzilla, does not mean that it is under investigation or even being looked into by the CPanel developers. In order for the developers to be aware of these issues (in the case of bugs) or enhancement requests, you need to vote for those listing. As a listing gains votes, the developers become aware of the issues and the votes show that there is a considerable interest in getting the issue or enhancement into CPanel.

    Atleast this is the way I believe the Bugzilla system works, someone can correct me if I'm wrong. I believe there may be some misconceptions going around where people believe that if an issue is listed in Bugzilla or mentioned in the forums that the developers are aware of the issue and are working on it. Again, unless I am wrong, this is not the case. The voting system in Bugzilla is there to bring those listings to the developers attention.

    So if you believe an enhancement or issue should warrant CPanel's attention, then I encourage you to vote for those requests.

    This has somewhat thrown this thread a bit off-topic, but I just wanted to bring this to anyone's attention if they were not already aware of this. If I am wrong in any regards to the Bugzilla system, please let me know, but I do encourage you to keep this thread on topic.
     
  6. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for the tip, sparek-3. It was really helpful! :)

    I'm new to cPanel's Bugzilla and I'll certainly register and vote for whatever issues that I feel would be helpful to have in their future versions.

    Thanks once again!
     
  7. jack01

    jack01 Well-Known Member

    Joined:
    Jul 21, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Excellent help Sparek, thanks a lot!
     
Loading...

Share This Page