Community Forums
Connect with us on LinkedIn
Closed Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    44

    Default php.ini and override default php.ini

    I´m running a system with phpSuexec. I try to activate register_globals for one directory.

    Since this is a cgi setup, I can only override this setting from php.ini on a per dir basis, and not through .htaccess or in httpd.conf.

    However: The php.ini file I have put in the directory, beside a test.php file with phpconfig(); content, doesn´t change register_globals. So, is there anywhere a directive that allows override like this? The php settings doesn´t change.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    I've got the same problem - is this because of new PHP version or something cPanel did while configuring PHP?

    twitter: oderland_david

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Nov 2003
    Location
    moscow
    Posts
    294

    Default

    you should recompile your php with option where php should find php.ini (i do not remember definately, so please read ./configure --help in php source folder). By default new version of php used only one - server php.ini
    https://robobill.net
    US dedicated, Europe and Asia and Russia dedicated server. Shared, Reseller, VPS hosting in US and Europe.
    We are RESELLER of dedicated servers since 2002.

  4. #4
    Member linux7802's Avatar
    Join Date
    Dec 2007
    Posts
    224
    cPanel/Enkompass Access Level

    Root Administrator

    Default Solution

    As you mentioned you are running phpSuexec server due to that YES you can only enable or disable the function directory base.For further please read following thread

    For example if you want to enable the register_globals for domain name test.com then you need to be create php.ini file under the public_html with the content "register_globals = On".It will enable the register_globals for that domains public_html folder only.

    If your script installed under the public_html i.e public_html/test folder which required the register_globals enabled then you also need to create new php.ini file with the content "register_globals = On" to enable it for the entire folder public_html/test. Because php.ini file is working on directory basis and each directory required its own php.ini file to change the php values.

    If you are not able to change the values by using php.ini in that case I like to recommend you to recompile the php on your server or try to disable the phpsuexec from your WHM >> Main >> Service Configuration >> Apache Configuration and select "dso" for "PHP 5 Handler" and try to enable the disable the php values by using .htaccess file
    Regards,
    G R Sonar
    cPanel Hosting Blog

  5. #5
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by areh View Post
    I´m running a system with phpSuexec. I try to activate register_globals for one directory.

    Since this is a cgi setup, I can only override this setting from php.ini on a per dir basis, and not through .htaccess or in httpd.conf.

    However: The php.ini file I have put in the directory, beside a test.php file with phpconfig(); content, doesn´t change register_globals. So, is there anywhere a directive that allows override like this? The php settings doesn´t change.
    Are you certain you are running phpSuExec?

    I get the impression you may actually be running the newer SuPHP which
    operates similar to the old phpSuExec but not exactly the same and
    there are differences in how you do configuration overrides.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    wow who dug up this old thread from 2006?

    twitter: oderland_david

  7. #7
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by areh View Post
    I´m running a system with phpSuexec. I try to activate register_globals for one directory.

    Since this is a cgi setup, I can only override this setting from php.ini on a per dir basis, and not through .htaccess or in httpd.conf.

    However: The php.ini file I have put in the directory, beside a test.php file with phpconfig(); content, doesn´t change register_globals. So, is there anywhere a directive that allows override like this? The php settings doesn´t change.
    Are you certain you are running phpSuExec?

    I get the impression you may actually be running the newer SuPHP which
    operates similar to the old phpSuExec but not exactly the same and
    there are differences in how you do configuration overrides.

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. Override php.ini directives
    By mehrdad abed in forum New User Questions
    Replies: 3
    Last Post: 06-03-2007, 09:06 AM
  4. PHP5, phpSuExec and php.ini override.
    By Serra in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 01-29-2007, 05:10 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