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.

non changing php.ini

Discussion in 'General Discussion' started by arkain, Aug 23, 2006.

  1. arkain

    arkain Well-Known Member

    Joined:
    Mar 20, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    is it just me or everyone else is getting this too. I've tried to change php.ini within /usr/local/Zend/etc/php.ini because that's what I get when i do phpinfo... i'm trying to increase my upload max field, and it's still at 2M... I've looked at other php.ini and also changed that just to make sure, and it still didn't change... anybody know why this is?
     
  2. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    do you have a seperate php.ini for the site you are doing the phpinfo(); from?
     
  3. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    Multiple php.ini files in the system found!

    Hi, I also kept changing a php.ini today and thought I was going crazy as the changes did not reflect on the system even after Apache restart.
    Eventually I found the php.ini in /etc/ was non-functional ... there is another php.ini in /usr/local/lib/ and that one is live.

    But why this? Anybody knows?

    I did an upgrade from php4.4.0 to 4.4.0 to 5.1.4 via cPanel - could that be related to the problem? Does it mean cPanel leaves "garbage" after recompile?
    This issue/confusion is relatively benign - but I guess such leftovers can create more serious problems when doing other things..
     
  4. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    the OS default location for the php.ini from an RPM or yum install is /etc/ wheras a manual compile (which is what cpanel does) is /usr/local/lib/ and if you have zend optimizer installed it is /usr/local/Zend/etc with a symlink from /usr/local/lib
     
  5. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    Thanks nickp666 But is that not confusing for any future upgrades of the server? After a few times, how does one know which php.ini or php installation is the current one? Would it not be better to remove the old installs and if so, how?
     
  6. arkain

    arkain Well-Known Member

    Joined:
    Mar 20, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    unfortunately, changing those didn't work as well. I've tried to change from 2M to 100M and it still didn't work.
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Did you remember to restart apache?

    The /etc/php.ini is never used on a cPanel server.

    The others in /usr/lib/php.ini and /usr/local/lib/php.ini need to be there and should be symlinked in that order. If you install Zend Optimizer, it itself moves php.ini to the location nick mentioned and then in turn symlinks the one in /usr/local/lib/php.ini to it. So, because of the symlinks, you should only have one live php.ini file.
     
  8. arkain

    arkain Well-Known Member

    Joined:
    Mar 20, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    /etc/init.d/httpd restart

    I do that every single time I make changes... and last time i did a whole system reboot...

    I've changed all the php.ini file i can find in my server just to be safe and still nothing....
     
  9. tjfulopp

    tjfulopp Member

    Joined:
    Sep 22, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Slovakia / Belgium
    not true, Chirpy!

    In my cPanel, I had PHP v4.4.0, which, using cPanel, I upgraded to PHP v5.1.4.

    And the "live" php.ini is in /etc ... I have wasted so much time before I've found this!!

    This totally contradicts your statement -- how is this possible?

    Cheers,

    Tomas


    FYI, I am running "release tree" updates, automatically.
     
Loading...

Share This Page