Discussion:
Do local php.ini files overwrite all variables on a central server php.ini?
Misha
2014-01-13 20:46:00 UTC
Permalink
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?

Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Aziz Saleh
2014-01-13 21:22:12 UTC
Permalink
It will default the unlisted configurations to the default php.ini on the
server.
I have a question about php.ini files. I am using a shared hosting server
for hosting a website. They use a customized php.ini file for the server. I
would like to override certain variables on a local directory. What I have
heard is that I must include all the variables on the php.ini file or else
it will set the unlisted ones to defaults. Is this true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Misha
2014-01-14 02:47:34 UTC
Permalink
Ah, so it won't default to the "factory settings"? That sounds great. I
can simply include specific settings in my local php.ini file then,
rather than continually updating the whole, local file.

Misha
Post by Aziz Saleh
It will default the unlisted configurations to the default php.ini on the
server.
I have a question about php.ini files. I am using a shared hosting server
for hosting a website. They use a customized php.ini file for the server. I
would like to override certain variables on a local directory. What I have
heard is that I must include all the variables on the php.ini file or else
it will set the unlisted ones to defaults. Is this true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Misha
2014-01-14 18:17:16 UTC
Permalink
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I
can ask in?)?

Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Aziz Saleh
2014-01-14 18:20:47 UTC
Permalink
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.

Aziz
Post by Misha
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Misha
2014-01-15 17:49:23 UTC
Permalink
Yes, but I don't actually have control over the main php.ini file. I'm
actually the user on the shared server.

I hate to be so cautious about this, but somehow it's very hard to find
an answer! I have heard both that it does revert to defaults (years ago
and recently) and also a few times that it reverts to the server
defaults (recently).
Post by Aziz Saleh
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.
Aziz
Post by Misha
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Aziz Saleh
2014-01-15 18:00:13 UTC
Permalink
Even if you are on a shared server, do a phpinfo() without any overrides, I
am pretty sure at least 1 variable in the main php.ini file has been
changed from the default values:

http://www.php.net/manual/en/ini.core.php
Post by Misha
Yes, but I don't actually have control over the main php.ini file. I'm
actually the user on the shared server.
I hate to be so cautious about this, but somehow it's very hard to find an
answer! I have heard both that it does revert to defaults (years ago and
recently) and also a few times that it reverts to the server defaults
(recently).
Post by Aziz Saleh
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.
Aziz
I wanted to double check (to see if anyone else can confirm what Aziz
Post by Misha
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
I have a question about php.ini files. I am using a shared hosting
Post by Misha
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Giner
2014-01-15 18:35:49 UTC
Permalink
Post by Misha
Yes, but I don't actually have control over the main php.ini file. I'm
actually the user on the shared server.
I hate to be so cautious about this, but somehow it's very hard to find
an answer! I have heard both that it does revert to defaults (years ago
and recently) and also a few times that it reverts to the server
defaults (recently).
Post by Aziz Saleh
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.
Aziz
On Tue, Jan 14, 2014 at 1:17 PM, Misha
Post by Misha
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the difference whether an .ini setting reverts to (what you
call) server defaults or the main php.ini file settings? If in the end
you don't like a setting, just add it to your personal 'override' .ini file.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Misha
2014-01-24 05:09:29 UTC
Permalink
Hi Jim,
Post by Jim Giner
What is the difference whether an .ini setting reverts to (what you
call) server defaults or the main php.ini file settings?

If there is a default setting for PHP then it may conflict with the
settings the server wants to have PHP set at. An example I thought of
is, let's say there is a default of 8 MB for the "memory_limit". If the
main php.ini file on the server ups that to 16 MB but a local php.ini
resets it to the default, then that would mean the setting would be at 8
MB rather than the desired 16 MB.

Thus if a local php.ini file can set a setting to the factory defaults
that might cause issues.

However, in talking with my website host, I learn that there is no
(according to him) "factory default" and that if there is no php.ini
file on the server PHP will not function. I am not expert enough to tell
if this is how it works!

Maybe someone here can confirm. To determine if this is how it works I
would have to find a php.ini setting that is different from the default
php.ini settings and that is a bit of a todo. I have not gotten around
to it.

Misha
Post by Jim Giner
Post by Misha
Yes, but I don't actually have control over the main php.ini file. I'm
actually the user on the shared server.
I hate to be so cautious about this, but somehow it's very hard to find
an answer! I have heard both that it does revert to defaults (years ago
and recently) and also a few times that it reverts to the server
defaults (recently).
Post by Aziz Saleh
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.
Aziz
On Tue, Jan 14, 2014 at 1:17 PM, Misha
Post by Misha
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the difference whether an .ini setting reverts to (what you
call) server defaults or the main php.ini file settings? If in the end
you don't like a setting, just add it to your personal 'override' .ini file.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Giner
2014-01-24 12:51:08 UTC
Permalink
Post by Misha
Hi Jim,
Post by Jim Giner
What is the difference whether an .ini setting reverts to (what you
call) server defaults or the main php.ini file settings?
If there is a default setting for PHP then it may conflict with the
settings the server wants to have PHP set at. An example I thought of
is, let's say there is a default of 8 MB for the "memory_limit". If the
main php.ini file on the server ups that to 16 MB but a local php.ini
resets it to the default, then that would mean the setting would be at 8
MB rather than the desired 16 MB.
Thus if a local php.ini file can set a setting to the factory defaults
that might cause issues.
However, in talking with my website host, I learn that there is no
(according to him) "factory default" and that if there is no php.ini
file on the server PHP will not function. I am not expert enough to tell
if this is how it works!
Maybe someone here can confirm. To determine if this is how it works I
would have to find a php.ini setting that is different from the default
php.ini settings and that is a bit of a todo. I have not gotten around
to it.
Misha
Post by Jim Giner
Post by Misha
Yes, but I don't actually have control over the main php.ini file. I'm
actually the user on the shared server.
I hate to be so cautious about this, but somehow it's very hard to find
an answer! I have heard both that it does revert to defaults (years ago
and recently) and also a few times that it reverts to the server
defaults (recently).
Post by Aziz Saleh
You can easily confirm by changing your main php.ini to a non default
value, then use a localized php.ini that doesn't contain that value and
make sure it is still not the default value.
Aziz
On Tue, Jan 14, 2014 at 1:17 PM, Misha
Post by Misha
I wanted to double check (to see if anyone else can confirm what Aziz
says) this. Can anyone else comment (or is there a better newsgroup I can
ask in?)?
Thanks.
Post by Misha
I have a question about php.ini files. I am using a shared hosting
server for hosting a website. They use a customized php.ini file for the
server. I would like to override certain variables on a local directory.
What I have heard is that I must include all the variables on the
php.ini file or else it will set the unlisted ones to defaults. Is this
true?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the difference whether an .ini setting reverts to (what you
call) server defaults or the main php.ini file settings? If in the end
you don't like a setting, just add it to your personal 'override' .ini file.
Listen to your provider. The "default" is of course whatever the host
has defined php.ini to be. If you personally set an .ini file in a
folder then that is the "default" for that folder (and below?).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...