Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Member
    Join Date
    Oct 2005
    Posts
    125

    Default PHP5, phpSuExec and php.ini override.

    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. #2
    Member
    Join Date
    Oct 2005
    Posts
    125

    Default

    No one is having this problem but me and HostGator? Someone must be... please help!

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

    Default

    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. #4
    Member
    Join Date
    Dec 2003
    Posts
    124

    Default

    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. #5
    Member
    Join Date
    May 2004
    Posts
    44

    Default

    Mysteerie,

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

    Michael

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

    Default

    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. #7
    Member
    Join Date
    May 2004
    Posts
    44

    Default

    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. #8
    Registered User
    Join Date
    Oct 2005
    Posts
    1

    Question

    Quote Originally Posted by greetingsc
    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)?
    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. #9
    Member
    Join Date
    May 2004
    Posts
    44

    Default

    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. #10
    Member
    Join Date
    Sep 2005
    Posts
    21

    Default

    just try to recompile it and add something like

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

  11. #11
    Member bvierra's Avatar
    Join Date
    Jul 2006
    Location
    Southern California
    Posts
    55

    Default

    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. #12
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by Serra View Post
    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)
    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.
    Last edited by Spiral; 01-28-2007 at 09:48 AM.

  13. #13
    Member bvierra's Avatar
    Join Date
    Jul 2006
    Location
    Southern California
    Posts
    55

    Default

    Quote Originally Posted by Spiral View Post
    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.
    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

Similar Threads & Tags
Similar threads

  1. Replies: 4
    Last Post: 10-07-2010, 08:00 PM
  2. Disable memory_limit override in user php.ini
    By smurf in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-24-2009, 11:05 AM
  3. php.ini and override default php.ini
    By areh in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 08-24-2009, 05:45 PM
  4. Override php.ini directives
    By mehrdad abed in forum New User Questions
    Replies: 3
    Last Post: 06-03-2007, 09:06 AM
  5. Override php.ini in phpsuexec
    By latpanel in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-17-2005, 05:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube