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.

php.ini and override default php.ini

Discussion in 'General Discussion' started by areh, Sep 18, 2006.

Thread Status:
Not open for further replies.
  1. areh

    areh Active Member

    Joined:
    Jul 26, 2002
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    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. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    I've got the same problem - is this because of new PHP version or something cPanel did while configuring PHP?
     
  3. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    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
     
  4. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    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
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    wow who dug up this old thread from 2006? :)
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page