HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   which php.ini's get applied (http://www.howtoforge.com/forums/showthread.php?t=52262)

Ovidiu 13th April 2011 11:57

which php.ini's get applied
 
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?

Ovidiu 13th April 2011 12:06

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
/var/www/conf/web1/php.ini

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
h1870666:/var/www/knightsenglish.com/web/wp-content/plugins/mailpress#


where does this come from?

Ovidiu 13th April 2011 14:20

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!

till 13th April 2011 15:55

Quote:

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
correct.

Quote:

now which one takes precedence?
/var/www/conf/web1/php.ini

Quote:

How can I update his local copy to my updated one?
Change a value in the custom php.ini settings and click on save.

Ovidiu 13th April 2011 16:07

thx Till, I understand all that now but please have a look at my second post: http://howtoforge.com/forums/showpos...55&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?

till 13th April 2011 16:11

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.

Ovidiu 13th April 2011 16:12

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

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

Ovidiu 13th April 2011 16:13

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

Change a value in the custom php.ini settings and click on save.
THANKS!

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

till 13th April 2011 16:13

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.

till 13th April 2011 16:16

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


All times are GMT +2. The time now is 04:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.