Re: [PHP4BETA] cvs: /php4 php.ini-dist
| From: | Flavien LEBARBE | Date: | Mon, 20 Mar 2000 18:31:13 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4 php.ini-dist | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12440@lists.php.net to get a copy of this message | ||
Rasmus wrote :
> I don't see how configuring it to be an empty string is any better. Yes,
> get_cfg_var() will return this empty string, but what good is that?
None. You're right. :)
> The real issue here is whether get_cfg_var() should return the compiled in
> default for a config directive that is defaulted. I think it probably
> should.
This is what I wanted to point out and be sure everybody was aware of.
This should definitely be fixed once and for all by having only two locations
were config vars are stored in memory:
1) Default value (compiled-in value if any, overridden by global php.ini),
that is read-only, and common to all threads in case of running as a module.
2) Current value (defaults to Default value, overridden by local php.ini and
.htaccess settings), runtime modifyable.
But that might be for next release only ;-)
May be generating the default config file at ./configure time with the
compiled-in values could be a temporary fix for now ??? [I didn't look
at it yet, just an idea, any opinions on the subject ?]
Anyway, given the behaviour that PHP has with config vars at the moment, which
can be very confusing in some situations, I'd recommend not relying on compiled-in
values at all (-ie- set them to "" or /usr/bin/false), forcing the user to
set them in php.ini. This way, the value reported by get_cfg_var() and the one
that is used are always the same, avoiding any confusion.
Flavien Lebarbé
--
Open Care