Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    64

    Default PHPSuExec and Php.ini

    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. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by asterisk
    Did you guys have to put it in every subdir as well?
    Yes. I'm not sure if there is any other option.

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

    Default

    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. #4
    Member
    Join Date
    Nov 2005
    Posts
    64

    Default

    Quote Originally Posted by webignition
    Yes. I'm not sure if there is any other option.
    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. #5
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    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. #6
    Member
    Join Date
    Nov 2005
    Posts
    64

    Default

    Quote Originally Posted by sparek-3
    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 {} \;
    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. #7
    Member
    Join Date
    Jul 2004
    Posts
    182

    Default

    Excellent help Sparek, thanks a lot!

Similar Threads & Tags
Similar threads

  1. PHPSuexec and Register_globals / php.ini?
    By Ralph9110 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-20-2007, 01:52 AM
  2. PHP5, phpSuExec and php.ini override.
    By Serra in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 01-29-2007, 06:10 AM
  3. TIP: PHP 5.1.6 + phpsuexec + local php.ini (register_globals)
    By Bazer in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-13-2007, 04:25 PM
  4. Override php.ini in phpsuexec
    By latpanel in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-17-2005, 06:42 PM
  5. phpsuexec / php.ini / php_accelerator
    By webignition in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-04-2005, 04:56 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube