Which php.ini

Discussion in 'Installation/Configuration' started by unsichtbare, Jan 1, 2008.

  1. unsichtbare

    unsichtbare Member HowtoForge Supporter

    I installed xcache with the command apt-get install php5-xcache, however I am unsure if it is actually working, so I went to review my php.ini and discovered that there are 4 of them:
    1. Should /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini be the same?
    2. do I need to copy the contents of /usr/share/doc/php5-xcache/examples/php.ini to one of the other php.ini's to make it work?
    3. Does this have anything to do with the message "PHP Warning: Module 'json' already loaded in Unknown on line 0" because the extension json.so is specified in both the .../cli/php.ini and .../apache2/php.ini

    I feel really ignorant asking these questions, but most of my experience is on a Fedora box which is a little bit different.

    -John

    Ubuntu Server 7.04 - The Perfect Setup
    ISP Config
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to check if xcache is working, create php file with the content:

    Code:
    <?php
    phpinfo();
    ?>
    Then call the file in the browser and check if xcache is listed there.

    The php.ini for your apache webserver is:

    /etc/php5/apache2/php.ini

    but the xcache extensions does not nescessarily be enabled there if there are other include directories for sub ini files.
     
  3. unsichtbare

    unsichtbare Member HowtoForge Supporter

    It does not look like xcache is being loaded:

     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you search the complete site for the word "xcache" with the search function of the webbrowser?
     
  5. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Yes, and I looked at all of the paths suggested by the phpinfo reporr too.


    -J
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I recommend that you try to search for xcache on your server and if the .so file for xcahe is installed, add it to your php.ini manually.
     
  7. unsichtbare

    unsichtbare Member HowtoForge Supporter

    I added it to the correct php.ini and now it shows when I run phpinfo, but not much impact on performance
     

Share This Page