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.

local php.ini default

Discussion in 'General Discussion' started by section31, Oct 7, 2008.

  1. section31

    section31 Active Member

    Joined:
    Sep 3, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio
    I noticed if I drop a php.ini in an account's public_html without setting anything, it defaults to a configuration which is different than the ini located here /usr/local/lib/php.ini

    What ini is this defaulting to?
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I think it is defaulting to php's actual default, i.e. what you get if there is no php.ini file anywhere.
     
  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
    Indeed.

    PHP won't read the system-wide php.ini and then overwrite settings with the user's custom php.ini.

    Instead PHP reads just the custom php.ini.

    If you use a custom php.ini the PHP interpreter completely ignores and forgets about the system-wide php.ini file.

    This is why you have to copy the system-wide php.ini into the user's directory and then make changes on that copy.
     
  4. section31

    section31 Active Member

    Joined:
    Sep 3, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio
    So it defaults to? nobody knows?
     
  5. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    It defaults to php's internal defaults. You can look those up at php.net I suppose.
     
  6. section31

    section31 Active Member

    Joined:
    Sep 3, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio
    What's causing php to be setup in this manner where php.ini files are first looked inside the webroot?
     
Loading...

Share This Page