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

Re: duplicated php option



hi,

On Sat, 2007-02-17 at 23:31 +0900, Atsuhito Kohda wrote:
> I noticed recently that some php options seem to
> be duplicated.  I didn't investigate generally
> but with magic_quotes_gpc I found under /etc
> 
> moodle/apache.conf:     php_flag magic_quotes_gpc On
> php5/apache2/php.ini:magic_quotes_gpc = On
> php5/cli/php.ini:magic_quotes_gpc = On
> php5/cgi/php.ini:magic_quotes_gpc = On
> phpmyadmin/htaccess:        php_flag magic_quotes_gpc Off
> (there are similar settings with php4)
> 
> and I wondered magic_quotes_gpc was On or Off on my system.
> In fact which setting is effective?

the setting can be on or off in different contexts.  the php-specified
configuration takes the form of /etc/phpN/SAPI/php.ini (and likewise
conf.d), where N is the php major version, and SAPI is the version of
the php engine being run (cli, cgi, apache2, etc).  in all cases the
default settings are mostly the same, but they are logically seperated
so that you can do things like disabling memory limits for cli based
programs without doing so for your web scripts at the same time.

you can also affect php settings on an application-specific basis, as
you see with the moodle/phpmyadmin settings.  i would say that this
is the recommended method if you are packaging a webapp that requires
certain (possibly non-default) php settings in order to work.  this way
you can enable/disable/change them, but only for the location under
which the webapp runs.

as for what a "local admin" ought to change, well it's all
configuration, i would say change it where it makes the most sense
or is easiest to maintain.  and if there's any confusion, you can always
use ini_get() or phpinfo() to verify the settings in the specific
context.



	sean


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: