Re: Bug #2229 Updated: Unable to restore magic_quotes_gpc
| From: | Kirill Maximov | Date: | Thu, 09 Sep 1999 06:47:53 +0000 |
| Subject: | Re: Bug #2229 Updated: Unable to restore magic_quotes_gpc | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-10750@lists.php.net to get a copy of this message | ||
On Wed, Sep 08, 1999 at 09:52:01AM -0400, Rasmus Lerdorf wrote:
> > Anyway, I got a solution for the problem using this small patch
> > to mod_php3.c. I would appreciate if you explain me
> > what could be wrong with it.
>
> What was the logic you used to get to that fix? The config file handling
All logic I get only from Apache API, more preciesly, from the part
"Per-directory configuration structures".
If look at this code:
if (add->magic_quotes_gpc != orig.magic_quotes_gpc)
new->magic_quotes_gpc = add->magic_quotes_runtime;
we see, that we can't change value of magic_quotes_gpc if
new value is the same as in php3.ini. From my point of view,
these lines should look like this:
if (add->magic_quotes_gpc != base->magic_quotes_gpc)
new->magic_quotes_gpc = add->magic_quotes_runtime;
As I understand, in this case we are using parent directory information
as a base for current directory.
> code in Apache is the most confusing part of the whole thing and looking
> at the dir merge stuff I don't remember my reasoning for keeping *base and
> *orig separate.
No idea here :(. From my point of view *orig configuration is not
needed in this function et all ...
Best regards,
KIR
--
----- ----- ----- ----- ----- ----- ----- -----
Kirill Maximov; maximov@astrive.com ICQ: 14796643