You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leonard den Ottolander <le...@den.ottolander.nl> on 2005/01/29 14:41:28 UTC

[users@httpd] RemoveType .php not working

Hi,

I tried to disable execution of php in a directory using the RemoveType
directive ("RemoveType .php"). According to
http://marc.theaimsgroup.com/?l=apache-httpd-users&m=109318294013218&w=2
this should work. I tried this both in .htaccess in the directory, as
well as from the name based virtual host using a <Directory> section.
Both do not disable the parsing of php in the affected directory.

ForceType text/html works fine in both cases, and so does adding a "php
engine off" to the <Directory> config.

> cat /etc/SuSE-release 
SuSE Linux 9.0 (i586)
VERSION = 9.0
> rpm -q apache2
apache2-2.0.48-146
> cat /etc/apache2/conf.d/mod_php4.conf
<IfModule sapi_apache2.c>
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php .php3
        AddType application/x-httpd-php .php4
        AddType application/x-httpd-php-source .phps
        DirectoryIndex index.php
        DirectoryIndex index.php3
        DirectoryIndex index.php4
</IfModule>

Am I doing something wrong or did I hit a bug? Have this been fixed in
later releases?

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RemoveType .php not working

Posted by Leonard den Ottolander <le...@den.ottolander.nl>.
Hi Jedi,

On Sat, 2005-01-29 at 16:22, The Disguised Jedi wrote:
> why not try the "php_flag engine off" statement in the .htaccess file
> in the directory you want the parser to be de-activated.  That should
> do the trick.

As you can read from my mail I know that statement indeed does work.

However, my question is if the fact that "RemoveType .php" doesn't work
for me is a bug or a user error on my part.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RemoveType .php not working

Posted by The Disguised Jedi <di...@gmail.com>.
why not try the "php_flag engine off" statement in the .htaccess file
in the directory you want the parser to be de-activated.  That should
do the trick.


On Sat, 29 Jan 2005 14:41:28 +0100, Leonard den Ottolander
<le...@den.ottolander.nl> wrote:
> Hi,
> 
> I tried to disable execution of php in a directory using the RemoveType
> directive ("RemoveType .php"). According to
> http://marc.theaimsgroup.com/?l=apache-httpd-users&m=109318294013218&w=2
> this should work. I tried this both in .htaccess in the directory, as
> well as from the name based virtual host using a <Directory> section.
> Both do not disable the parsing of php in the affected directory.
> 
> ForceType text/html works fine in both cases, and so does adding a "php
> engine off" to the <Directory> config.
> 
> > cat /etc/SuSE-release
> SuSE Linux 9.0 (i586)
> VERSION = 9.0
> > rpm -q apache2
> apache2-2.0.48-146
> > cat /etc/apache2/conf.d/mod_php4.conf
> <IfModule sapi_apache2.c>
>         AddType application/x-httpd-php .php
>         AddType application/x-httpd-php .php3
>         AddType application/x-httpd-php .php4
>         AddType application/x-httpd-php-source .phps
>         DirectoryIndex index.php
>         DirectoryIndex index.php3
>         DirectoryIndex index.php4
> </IfModule>
> 
> Am I doing something wrong or did I hit a bug? Have this been fixed in
> later releases?
> 
> Leonard.
> 
> --
> mount -t life -o ro /dev/dna /genetic/research
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


-- 
The Disguised Jedi
disguised.jedi@gmail.com

PHP rocks!
"Knowledge is Power.  Power Corrupts.  Go to school, become evil"

Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org