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 php.ini is being used?

Discussion in 'General Discussion' started by DataDork, Jan 13, 2005.

  1. DataDork

    DataDork Active Member

    Joined:
    Apr 11, 2003
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    I need to make some changes to my php.ini configuration. I was hoping someone could tell me how to determine which php.ini file to edit?

    /var/cpanel/version/php.ini-2
    /etc/php.ini
    /etc/php.ini.rpmold
    /usr/lib/php.ini
    /usr/local/lib/php.ini
    /usr/local/lib/php.ini.new
    /usr/local/lib/php.ini-zend_optimizer.bak
    /usr/local/cpanel/3rdparty/etc/php.ini
    /usr/local/cpanel/3rdparty/lib/php.ini
    /usr/local/Zend/etc/php.ini
    /home/cpins/installd/buildapache/php-4.3.8/pear/tests/php.ini
    /home/cpins/installd/buildapache/php-4.3.8/php.ini-recommended
    /home/cpins/installd/buildapache/php-4.3.8/php.ini-dist
    /home/cpapachebuild/buildapache/php-4.3.10/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.3.10/php.ini-recommended
    /home/cpapachebuild/buildapache/php-4.3.10/php.ini-dist
    /home/cpzendinstall/ZendOptimizer-2.5.7-linux-glibc21-i386/zui_files/php.ini
    /home/cpzendinstall/ZendOptimizer-2.5.7-linux-glibc21-i386/zui_files/_usr_local_lib_php.ini
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Without Zend - /usr/local/lib/php.ini. With Zend installed - /usr/local/Zend/etc/php.ini
     
  3. gpreston

    gpreston Well-Known Member

    Joined:
    Jan 31, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    West Chester, PA
    If you put a php file on your webserver with <?php phpinfo(); ?> in it and look at it, it will you show you the path of the php.ini file it is using.
     
  4. jondolar

    jondolar Well-Known Member

    Joined:
    Feb 15, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    You can type in the following from the shell as root.
    php -i | grep "php.ini"

    I hope that makes it easy for someone.
     
Loading...

Share This Page