php-general Digest 9 Oct 2013 07:14:21 -0000 Issue 8390

Topics (messages 322263 through 322268):

Re: php.ini
        322263 by: Simon Schick
        322264 by: Jim Giner
        322265 by: Jim Giner
        322266 by: Simon Schick
        322267 by: Jim Giner
        322268 by: Simon Schick

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi, Jim

I suggest to read this page of the tutorial. It seems, that it solves the
questions, you posted here:
http://www.php.net/manual/en/configuration.file.per-user.php

Please be aware, that the ini-file is not re-read on every request, but
after a defined time.
Neither are all settings changeable in those per-user ini-files.

Read also the other pages in this chapter, they're good to keep in mind ;)

If you're now calling the script from a webserver, you called by requesting
a page on a subdomain or a top-level-domain, doesn't matter.

Bye,
Simon


On Tue, Oct 8, 2013 at 4:48 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

> Can someone give me an understanding of how the .ini settings are located
> and combined?  I am under the impression that there is a full settings .ini
> file somewhere up high in my host's server tree and that any settings I
> create in .ini files in each of my domain folders are appended/updated
> against the 'main' ini settings to give me a 'current' group of php.ini
> settings.
>
> What I'm looking to find out is does an ini setting established in a test
> subdomain of my site affect those ini settings outside of my test subdomain?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On 10/8/2013 11:13 AM, Simon Schick wrote:
Hi, Jim

I suggest to read this page of the tutorial. It seems, that it solves the
questions, you posted here:
http://www.php.net/manual/en/configuration.file.per-user.php

Please be aware, that the ini-file is not re-read on every request, but
after a defined time.
Neither are all settings changeable in those per-user ini-files.

Read also the other pages in this chapter, they're good to keep in mind ;)

If you're now calling the script from a webserver, you called by requesting
a page on a subdomain or a top-level-domain, doesn't matter.

Bye,
Simon


On Tue, Oct 8, 2013 at 4:48 PM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

Can someone give me an understanding of how the .ini settings are located
and combined?  I am under the impression that there is a full settings .ini
file somewhere up high in my host's server tree and that any settings I
create in .ini files in each of my domain folders are appended/updated
against the 'main' ini settings to give me a 'current' group of php.ini
settings.

What I'm looking to find out is does an ini setting established in a test
subdomain of my site affect those ini settings outside of my test subdomain?

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



I need more!
1 - the doc you mentioned refers to 'user.ini'. Does that literally mean the file is called 'USER.ini'? I have been placing my .ini overrides/settings in each of my folders under the name 'php.ini'. Do I have to change them all because it seems that they are working fine.

2 - I didn't understand your last paragraph.

--- End Message ---
--- Begin Message ---
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?
--- End Message ---
--- Begin Message ---
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

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

Bye
Simon

--- End Message ---
--- Begin Message ---
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

* 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?
--- End Message ---
--- Begin Message ---
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

--- End Message ---

Reply via email to