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.

Which is REAL php.ini?

Discussion in 'General Discussion' started by TheKog, Oct 31, 2007.

  1. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I am doing some php tweaking and found php.ini files all over our Centos 4 installation (cpanel/WHM 11). Which is the real one and what are the others for? Also which one does the WHM php config editor operate on? Which one is php truly using?

    /etc/php.ini - appears to be pretty old (months old) -- doesn't match parms kicked out by phpinfo
    /usr/lib/php.ini - is a link to /usr/local/lib/php.ini
    /usr/local/lib/php.ini - I suspect this is the REAL one -- matches phpinfo parms
    /usr/local/cpanel/3rdparty/etc/php.ini - this one is ancient (by years) -- also doesn't match parms of phpinfo
    /scripts/php.ini -- this one scares me

    Does the whm php config editor truly operate on the current php.ini whichever one that is?
     
    #1 TheKog, Oct 31, 2007
    Last edited: Oct 31, 2007
  2. techark

    techark Well-Known Member

    Joined:
    May 22, 2002
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    /usr/lib/php.ini - is a link to /usr/local/lib/php.ini
    /usr/local/lib/php.ini

    Use either of those two.

    Do not repeat do not use the WHM php config editor.
    I found out the hard way it screws things up.
    It puts " " marks arround things you edit in it and then tends to add spaces.
    For instance session.save_handler = files becomes session.save_handler = "files "

    Which if you run a phpinfo looks fine on the screen but to apache and the scripts on your server does not work so you end up with a bunch of broken sessions.

    Found this out the hard way after one of my techs used the WHM editor and I spent 2 days running around in circles trying to find out why every joomla and Mambo site on the server broke.
     
  3. makan

    makan Active Member

    Joined:
    Nov 4, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    jakarta
    on our cpanel (WHM 11.11.0 cPanel 11.15.0-R17802), there is a menu to to edit php.ini, "Service Configuration --> PHP Configuration Editor"

    hope this help :)
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I believe these issues have been resolved in recent builds. If you are still experiencing these issues on the latest builds, please let us know either via a support ticket (allows for better diagnosis of the issue) or by submitting a bugzilla entry.
     
  5. techark

    techark Well-Known Member

    Joined:
    May 22, 2002
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
  6. Avg-Joe

    Avg-Joe Member

    Joined:
    Mar 28, 2002
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    This is also an issue on my server

    Editing through WHM added the quotes and spaces - essentially breaking sessions - once removed it all functioned properly.
     
Loading...

Share This Page