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.

PHP5, phpSuExec and php.ini override.

Discussion in 'General Discussion' started by Serra, Sep 23, 2006.

  1. Serra

    Serra Well-Known Member

    Joined:
    Oct 27, 2005
    Messages:
    213
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Florida
    I'm running PHP5 and phpSuExec and I want to use php.ini overrides in my local directories. HostGator support tells me that this is impossible. (ok, fine)

    Is it possible to do this or not? I've read just about every thread on this board and I've search the Internet for hours and I found no one who is having this problem outside of this forum and I don't see any one here who has the answer.

    What I do know. There is one thread that points to a setting in php_ini.c, but that setting is not in my php_ini.c file. There is also a thread that talks about information in the ./configuration file, but I've searched that file and I don't see anything there that will help.


    Has anyone done this?
     
  2. Serra

    Serra Well-Known Member

    Joined:
    Oct 27, 2005
    Messages:
    213
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Florida
    No one is having this problem but me and HostGator? Someone must be... please help!
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The way I understand it cPanel removed the feature that allowed customized php.ini files to be placed into the same directory as the PHP files and read instead of the server-wide PHP. This was removed in the latest PHP5 phpsuexec patches. I'm not absolutely certain that this is the case, but this is what I've read. I'm also not sure how this is suppose to be worked around in the new PHP5 phpsuexec. Apparently, if you are running PHP5 and phpsuexec, then you can no longer do customized PHP directive changes. They are either made server-wide or not made at all. But you would ultimately have to talk with cPanel concerning this.
     
  4. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    It wasn't cPanel. The developers of PHP decided that it was an undocumented feature (i.e. a bug) and simply fixed (removed) it in PHP 5.1.x and above.
     
  5. greetingsc

    greetingsc Active Member

    Joined:
    May 18, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Mysteerie,

    Do you know what version specifically this was changed in, I can't find it in the PHP changelog. Thanks.

    Michael
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I believe this was removed in PHP 5.1.2.

    Mysteerie may be correct. This may not be cPanel's doing. I never really read any official word on any of this. I just know that up until PHP 5.1.2 (I think) users could place php.ini files in their directories and that php.ini was read instead of the server-wide one. This is not to say that I disagree with this move. I do believe that there are security issues raised in allowing this. My main fuss is that it was there, then it was removed and never explained. Perhaps this was just one of those undocumented "features" that wasn't really acknowledged in the first place, so to disable it doesn't really require any acknowledgement either.
     
  7. greetingsc

    greetingsc Active Member

    Joined:
    May 18, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    For servers running phpsuexec, where can single user php directives be set if php.ini files cannot be used (and obviously .htaccess is out since it is phpsuexec)?
     
  8. Richie

    Richie Registered

    Joined:
    Oct 19, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Anybody have any idea on this yet as to how users are meant to set directives?
    We have just rolled out php5.1.6 and are seeing customers crying into their keyboards.!!!
     
  9. greetingsc

    greetingsc Active Member

    Joined:
    May 18, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    I believe your only option is to put the directive directly in the script (using ini_set function) or to set them globablly for the server.
     
  10. anest

    anest Member

    Joined:
    Sep 18, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    just try to recompile it and add something like

    --with-config-file-path=.:/etc:/usr/local/Zend/etc
     
  11. bvierra

    bvierra Well-Known Member

    Joined:
    Jul 28, 2006
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Southern California
    This is an issue with PHP 5.1 you can see it at: http://bugs.php.net/bug.php?id=38714

    All of HostGators servers have been updated. If you still have an issue please open a support ticket and put it to my attention.

    Billy Vierra
    CIO
    HostGator.com
     
  12. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Apparently that support is filled with a bunch of morons!

    You can specify custom PHP.INI files for any script or account either in
    the command line for both CGI and CLI or in the httpd.conf for
    all versions of PHP using phpSuExec.

    If running PHP v4.x or some versions of PHP v5.x, the user can also additionally
    specify their own custom PHP.INI file in the home directory of their account as well.
     
    #12 Spiral, Jan 28, 2007
    Last edited: Jan 28, 2007
  13. bvierra

    bvierra Well-Known Member

    Joined:
    Jul 28, 2006
    Messages:
    55
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Southern California
    Before making such blanketed comments please check out my response:
    This is an issue with PHP 5.1 you can see it at: http://bugs.php.net/bug.php?id=38714
     
Loading...
Similar Threads - PHP5 phpSuExec php
  1. durangod
    Replies:
    2
    Views:
    217

Share This Page