On 10/9/2013 3:14 AM, Simon Schick wrote:
On Tue, Oct 8, 2013 at 9:50 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

On 10/8/2013 2:42 PM, Simon Schick wrote:

On Tue, Oct 8, 2013 at 5:25 PM, Jim Giner <jim.gi...@albanyhandball.com>*
*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<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


Hi, Jim

You can define the name for this file your configuration (php basic
configuration file or in the webserver, calling the cgi/fcgi script).

The configuration is called "user_ini.filename", and it's default value is
set to ".user.ini". Of course, your provider (or you, if you're the
administrator of the php-instance) may changed this setting to something
like "php.ini". Then the php-process will search for a "php.ini" file in
the directories a user-ini file is searched in.
When talking about configuration files, this may be misleading, as the
basic configuration file is refered as "php.ini" over all in the
documentation.

I don't believe, that the PHP process would search for a file called
"php.ini", if the value is set to something like ".user.ini" - if that's
what you mean.

It may be, that you can change the setting later on, but it will have no
effect (f.e. if you change it using set_ini() ... if it doesn't trigger a
E_WARNING or something the like).

Hope this answers the remaining question. If not, I kindly ask you to write
some examples.

Bye,
Simon

Ok - here is what I see happening now. PHPINFO shows a setting named 'user_ini.filename' set to '.user.ini' At the same time the setting "loaded configuration file" shows that a "php.ini" file was loaded from the current sub folder that this call to phpinfo was running in (as I expect!). So apparently my host has set php to look for "user.ini" files, but "php.ini" files are still accepted and loaded.

I'm guessing that despite the user_ini filename setting, a PHP.ini file will still be read, which suits me just fine.

Thanks for all the help Simon!

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

Reply via email to