|
Posted by Dan on 05/13/05 22:12
Richard Lynch wrote:
> On Thu, May 12, 2005 12:48 pm, dan said:
>
>>I'm trying to override the value of php.ini's 'auto_prepend_file'
>>function, inside of an Apache Directory container. I'm not having much
>>luck. In fact, no luck at all. This never happens.
>>
>>So I'm wondering now, are functions set by 'php_value' inside of an
>>Apache config file only good for the entire VirtualHost in question, or
>>can they be applied on a per-directory basis using Apache's Directory
>>directive?
>
>
> Certainly some php_value directives can be over-ridden in .htaccess,
> regardless of whether they were set globally in httpd.conf or in a
> VirtualHost or Directory block.
>
> Equally certainly, some cannot be over-ridden.
>
> I am almost 100% certain that php_value makes no distinction between
> *where* in httpd.conf the setting comes from. I daresay php_value in
> .htaccess can't even tell the difference from one part of httpd.conf to
> the other.
>
> http://php.net/ has a page devoted to describing exactly which php_value
> settings can be over-ridden where. Check that.
>
> It's also possible that once auto_prepend_file is set, it's set, and
> that's it -- Regardless of where it is set, you're stuck with it at that
> value.
>
> So it's more of a 'define' for a constant that some kind of variable you
> can change on a whim. Part of that could easily be to provide web host
> administrators with a way to guarantee that some PHP code of theirs gets
> run no matter what their clients may try to do... Which I could see might
> be handy for some hosts, and they'd not want it over-ridden. These last
> two paragraphs are pure speculation on my part. But it could be true, and
> it wouldn't really fit into that nifty chart in the manual.
>
Richard -
Yes, I agree with you. I think it's an "all-on" or "all-off" sort of
thing, and you cannot be terribly specific with it's usage. THe only
way I've found to combat this issue is to make a different virtualhost
or some such, which is what I'm ging to end up doing.
I did take a look at php.net's page devoted to describing exactly which
php_value settings can be over-ridden, and it does claim that this
option can be set in a per-directory context.
Thanks for your time
-dant
Navigation:
[Reply to this message]
|