RE: PHP configuration values

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

 



On Fri, Sep 11, 2009 at 3:06 AM, Arno Kuhl <akuhl@xxxxxxxxxxxx> wrote:
> I'm having some problems with the way my service provider is 
> implementing FastCGI. My tests show that local configuration values 
> are no longer used, even though those are the values reported by php 
> when the script queries a setting (e.g. register_globals).
>
-----Original Message-----
From: Andrew Ballard [mailto:aballard@xxxxxxxxx] 

Changing register_globals in script will not have the desired effect, since
the action of registering globals will have been either completed or skipped
by the time you call ini_set(). If the host allows it, you can override it
in .htaccess, but I've not been able to do so on the couple sites I've
touched that were hosted on by a shared hosting provider. In those cases, I
WAS able to create my own php.ini file in the web root folder and configure
it as needed. Of course, if you do that you should also configure Apache to
not serve that file if requested.

Andrew
--


You're right, you can't change register_globals in script but you can query
it in script, which is what I was referring to. There aren't many settings
you can change in script, about the only useful one that we use is
max_execution_time. Either way, what I find in testing is that on our host
php returns the value reported in phpinfo as the "local value" which is
correct, because that's the value that should be in effect (combination of
httpd.conf, php.ini, .htaccess and values set in script), but the value
that's actually in effect is the master value. 

For example, if php.ini sets register_globals on and .htaccess sets
register_globals off, then the code 

    ini_get('register_globals')

reports register_globals is off (it's reporting the local value) but in fact
register_globals is on. In this particular case our app would stop with a
configuration error if it found register_globals on, but it thinks it's off
so happily carries on.

Local is supposed to override master values but they have master overriding
local values. I'm trying to confirm that local is supposed to override
master, and find a proper reference that I can show to my hosting guys. I
searched php.net but they don't mention which one takes precedence. Anyone
know of any references?

BTW Andrew, were those hosting servers that wouldn't allow override in
.htaccess running FastCGI? Maybe FastCGI doesn't allow config settings in
.htaccess but I can't find anything conclusive about that either.

Cheers
Arno


-- 
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