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 file

Discussion in 'General Discussion' started by Oleg.Gricik, Apr 14, 2012.

  1. Oleg.Gricik

    Oleg.Gricik Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi

    We are experiencing some problems with local php.ini file.
    When we put local php.ini with couple options, for example:
    memory_limit = 128M
    upload_max_filesize =10M
    We can't found a php.ini file from which other options(variables) are taken.
    I'm sure that this php.ini isn't located under /usr/local/lib/php.ini
    As according to phpinfo() variables(options) from local php.ini are different from /usr/local/lib/php.ini

    Does it use some cPanel's PHP.ini file?
    Where does it locate?
    How can we change it?
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Check in /usr/lib. There should be main php.ini file located.
     
  3. Oleg.Gricik

    Oleg.Gricik Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    it isn't /usr/lib/php.ini
    Our main php.ini is located here:
    /usr/local/lib/

    But when our clients use their local php.ini file with couple options, other options are taken from mysterious php.ini file

    Where is this mysterious php.ini file?
     
  4. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Do you wish to set custom features in php.ini for particular accounts?

    You can copy main php.ini file to account's public_html folder and then make necessary changes in php.ini file as per your requirement. You need to make sure that the ownership of this file should be user:user once you copy to new location.

    Also, try using phpinfo() page on account to see it loads the custom php.ini file instead of main php.ini file.
     
  5. Oleg.Gricik

    Oleg.Gricik Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    he he,
    I'm always doing this, but I want to know where the mysterious php.ini file is located.
    For unknown reason it doesn't include couple functions.
    If we can locate it, then we will be able to correct them
    As The result, it will decrease amount of requests from our clients.
     
  6. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    whats the result of the below command

    php -i | grep php.ini
     
  7. Oleg.Gricik

    Oleg.Gricik Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    But /usr/local/lib/php.ini.d doesn't work.
    I've already tested this.

    Any suggestions?

    Actually, I've run php -i|grep php.ini using root privileges.
     
    #7 Oleg.Gricik, Apr 17, 2012
    Last edited: Apr 17, 2012
  8. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Your mysterious php.ini should be same as /usr/local/lib/php.ini. Do you have only one PHP version installed OR multiple versions?
     
Loading...

Share This Page