Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    134

    Default Override php.ini in phpsuexec

    Using phpSuexec, every user could use his own php.ini and overwrite the "master" php.ini, so he could put registerglobals on or alter openbasedir and others.
    Is there any way to avoid that a user overwrite php.ini with his own php.ini? (Using phpsuExec, of course)

    Thanks

  2. #2
    Member
    Join Date
    Oct 2003
    Location
    Nirvana
    Posts
    184

    Default

    The only way to override this behavior is to patch PHP so it won't look outside the global php.ini.

    In main/php_ini.c look for

    /* Check CWD for php.ini */
    #define INI_CHECK_CWD

    change that to

    /* Check CWD for php.ini */
    /* #define INI_CHECK_CWD */

    and you will find that PHP will only obey the global php.ini. This cannot be turned on with a per website basis.
    http://www.lifelesspeople.com/ The revolution has begun! Pay by Post™ Webhosting is here!

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. PHP5, phpSuExec and php.ini override.
    By Serra in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 01-29-2007, 05:10 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube