Bug #2229: Unable to restore magic_quotes_gpc
| From: | kir at astrive dot ru | Date: | Fri, 03 Sep 1999 08:53:41 +0000 |
| Subject: | Bug #2229: Unable to restore magic_quotes_gpc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10493@lists.php.net to get a copy of this message | ||
From: kir@astrive.ru
Operating system: Solaris 2.7 x86
PHP version: 3.0 Latest CVS (03/09/1999)
PHP Bug Type: Other
Bug description: Unable to restore magic_quotes_gpc
I'm not quite sure if it is a bug or a feature. If it is the feature, I suppose it to be a
documentation problem.
In a short, in my configuration I'm unable to switch on magic_quotes_gpc.
[php3.ini]
magic_quotes_gpc = On
httpd.conf:
Group astrive
<Directory /u/home/kir/public_html>
AllowOverride All
</Directory>
$ ls -la /ASTRIVE/
drwxr-xr-x 5 kir staff 512 Sep 3 12:13 .
drwxr-x--x 19 kir astrive 2048 Sep 2 17:12 ..
-rw-r--r-- 1 kir staff 25 Sep 3 12:12 .htaccess
-rw-r--r-- 1 kir staff 34 Sep 3 12:34 a.php3
$ cat /u/home/kir/public_html/.htaccess
magic_quotes_gpc off
$cat /u/home/kir/public_html/ASTRIVE/.htaccess
magic_quotes_gpc on
^^^^^^^^^^^^^^^^^^^^^
This directive doesn't work !!! So I'm unable to switch on magic quotes
in this sutuation.
In merging function in mod_php3.c there are lines:
php3_ini_structure *base = (php3_ini_structure *) basev;
php3_ini_structure *add = (php3_ini_structure *) addv;
php3_ini_structure orig = php3_ini_master;
/* base structure is used !*/
memcpy(new,base,sizeof(php3_ini_structure));
/* compare with php3.ini structure !! Why ? */
if (add->magic_quotes_gpc != orig.magic_quotes_gpc)
new->magic_quotes_gpc = add->magic_quotes_gpc;
So as I understand In my situation if I switch magic quotes off in some directory, I will unable to
switch it back in subdirectory, if my php3.ini
have magic quotes on by default.
The same problem corresponds to the most of other directives in php3.ini.
Or it is not a problem ?