which php.ini's get applied

Discussion in 'General' started by Ovidiu, Apr 13, 2011.

  1. Ovidiu

    Ovidiu Active Member

    I know there are different php.ini's inside /etc/php5/etc /etc/php5/cli /etc/php5/cgi

    but now I checked the settings for a particular client and found he was using different values. So I found out he was using this php.ini /var/www/conf/web1/php.ini which seems to have been generated because I added some Custom php.ini settings when I configured his site in ispcfg3

    to me it seems when I created his site, a php.ini was copied to /var/www/conf/web1/php.ini and the Custom php.ini settings were added to this php.ini.

    My problem is that later on I changed the default php.ini i.e. /etc/php5/cgi - is this the one used by FastCGI? but he h
    still had the old copy inside /var/www/conf/web1/php.ini - now which one takes precedence? How can I update his local copy to my updated one?

    Sorry for the long confusing thread but can someone shed some light onto how this works please?
  2. Ovidiu

    Ovidiu Active Member

    added an example: http://zice.ro/info.php

    see the line: max_execution_time 30 ?

    now both php.ini's:
    /etc/php5/cgi/php.ini and

    have this value: max_execution_time = 60

    now where does the 30 come from?
    Please, need urgent help with this. there are some more settings I do not knwo where they come from :-(

    have a look:

    h1870666:/var/www/knightsenglish.com/web/wp-content/plugins/mailpress# grep -R -i 'max_execution_time' /etc/php5/
    /etc/php5/cgi/php.ini:max_execution_time = 60
    /etc/php5/apache2/php.ini:max_execution_time = 60
    /etc/php5/cli/php.ini:max_execution_time = 60
    h1870666:/var/www/knightsenglish.com/web/wp-content/plugins/mailpress# grep -R -i 'max_execution_time' /var/www/conf/web1/
    /var/www/conf/web1/php.ini:max_execution_time = 60

    where does this come from?
    Last edited: Apr 13, 2011
  3. Ovidiu

    Ovidiu Active Member

    this has jsut become extremely urgent!

    it seems my setting of: display_errors = OFF

    is now also being ignored and my sites have errors all over them :-(

    Please help!
  4. till

    till Super Moderator Staff Member ISPConfig Developer



    Change a value in the custom php.ini settings and click on save.
  5. Ovidiu

    Ovidiu Active Member

    thx Till, I understand all that now but please have a look at my second post: http://howtoforge.com/forums/showpost.php?p=255155&postcount=2

    the value that shows up is nowhere in my php.ini files !?

    The point is hte problem could have been there for a while, I just realized it today as I did a /etc/ini.t/apache force-reload
    oh, I rememebred: one of hte last changes I did, a whiel ago was add these: /etc/squirrelmail:/usr/share/squirrelmail:/usr/share/xcache/admin:/var/www/piwik to the custom PHP open_basedir - that shouldn't matter with this problem surely?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a php file which contains the phpinfo() function. It will tell you which php.ini files are used for this website. If the website uses mod_php, then the settings can be also in a .htaccess file inside the website root.
  7. Ovidiu

    Ovidiu Active Member

    sorry it seems I forgot to post the link: http://zice.ro/info.php

    that all doesn't make sense without this link...
  8. Ovidiu

    Ovidiu Active Member

    ahhhh, it all works now after I followed your advice of:

    I don't understand what happened but all is good now.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Here are the files that you have to check:

    Configuration File (php.ini) Path /etc/php5/cgi
    Loaded Configuration File /var/www/conf/web1/php.ini
    Scan this dir for additional .ini files /etc/php5/cgi/conf.d
    Additional .ini files parsed /etc/php5/cgi/conf.d/curl.ini, /etc/php5/cgi/conf.d/gd.ini, /etc/php5/cgi/conf.d/imagick.ini, /etc/php5/cgi/conf.d/imap.ini, /etc/php5/cgi/conf.d/mcrypt.ini, /etc/php5/cgi/conf.d/memcache.ini, /etc/php5/cgi/conf.d/mysql.ini, /etc/php5/cgi/conf.d/mysqli.ini, /etc/php5/cgi/conf.d/pdo.ini, /etc/php5/cgi/conf.d/pdo_mysql.ini, /etc/php5/cgi/conf.d/recode.ini, /etc/php5/cgi/conf.d/suhosin.ini, /etc/php5/cgi/conf.d/xcache.ini

    if the value is not defined there, then its the default compiled in value of the php binary and you can override it in the php.ini settings field in ispconfig.

    If you did any manual changes, make sure that you restarted apache and not just reloaded it.
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Just as a additional note, max_execution time is 60 as defined in your php.ini files and not 30.
  11. Ovidiu

    Ovidiu Active Member

    it was all solved with your advice further up :)


Share This Page