Re: php.ini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/8/2013 2:42 PM, Simon Schick wrote:
On Tue, Oct 8, 2013 at 5:25 PM, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx>wrote:

re: changing ini settings.

If my running script modifies an ini setting I currently believe that that
changed setting will apply to that specific process and any others that run
after that from that same folder (since i have an ini file in each folder
currently).  Correct?

And if I do make a setting change as above, it only affects the ini file
and processes in that folder, thus leaving the setting unchanged in any and
all other folders above that one.  Correct?

And from the article pointed out to me, I get the impression that the
search for ini files bubbles up from the executing folder.  If that is so,
then am I correct in assuming that settings in the lowest ini file take
precedence over any found in 'bubbled-up' ini files?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Hi, Jim

Never mind my last paragraph ... I was thinking the wrong way of what you
wrote earlier.

I haven't tested it properly in every detail, but from the perspective of
what I know it's like you wrote.

The file that's mentioned as "php.ini" is the main configuration file of
your php-installation. It may be, that the user-ini file was renamed to
"php.ini" as well, but if you read about "php.ini", they always mean the
configuration-file that you see listed in the output of phpinfo() as
"Configuration File (php.ini) Path".

* You can rename the user-ini file by changing the user_ini.filename
setting in the php.ini file (as written on the page I linked you to)

* The php-settings are restored after/before each script-execution

* The manual doesn't catch if a user-ini file was found ... just that it
bubbles up to the document_root. Maybe the configuration found in user-ini
files is merged, or just the first file is taken.

* I don't know what happens to configuration you apply f.e. in nginx ... I
know neither when settings in php-fpm are applied ... that's something left
for testing, or until somebody finds the documentation explaining it (I
know there is one ...), but I guess they're applied after the php.ini and
before the user-ini files.
Examples are listed here:
http://php.net/manual/en/install.fpm.configuration.php#example-60

* What you set using set_ini() is just applied for the rest of the
currently running script.

Bye
Simon

I understand most of what you wrote and agree all except for one thing. You keep using the name "user.ini" and I asked for clarification on this earlier. Do I have to create files named EXACTLY that way, or are "php.ini" files correctly named?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux