Re: Great bug into php3_merge_dir()
| From: | Zeev Suraski | Date: | Sat, 18 Sep 1999 15:25:49 +0000 |
| Subject: | Re: Great bug into php3_merge_dir() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-11048@lists.php.net to get a copy of this message | ||
Well, for starters, it might be buggy, but it's definitely not bugged.
On Sat, 18 Sep 1999, Federico Giannici wrote:
> I really cannot understand the logic used into the php3_merge_dir()
> function of mod_php3.c!
> According to me it's bugged!!!
>
> Let's make an example.
>
> I want to make php disabled by default and then enable it only in some
> selected directory of some virtualhost. So I put a "php3_engine off"
> into the root of httpd.conf (outside of every virtual host). Then I put
> a "php3_engine on" into some <Directory xxx> into some virtualhost, so
> (I thought) php is enabled only there.
>
> Well, this configuration doesn't works because of the incomprensible
> php3_merge_dir() logic: it only add new commands into a new directory
> configuration only if they are different from the default configuration.
> That is, "php3_engine on" is NEVER added!!!
From first glance, you seem to be right. Rasmus wrote that code in PHP
3.0, he might be able to shed some light on this.
The PHP 4.0 approach to this has changed (the dir merger is just a couple
of lines), and it handles this properly.
Zeev
--
-----------------------------------------------------
Zeev Suraski <zeev@zend.com> http://www.zend.com/
For a PGP public key, finger bourbon@netvision.net.il