You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Ali, Saqib" <do...@gmail.com> on 2008/06/03 01:15:55 UTC

[users@httpd] ForceType text/plain works for PHP but not for SSI

I have the following defined for port 81 on a web server that has
WebDAV enabled. This forces the httpd to send PHP files "unparsed".
    <VirtualHost x.x.x.x:81>
    DocumentRoot /var/www/html/
    <Directory /usr/local/apache/htdocs/>
    DAV On
   </Directory>
    ForceType text/plain
    </VirtualHost>

However it doesn't seem to work for Server Side Includes (SSI). How so?


saqib
http://doctrina.wordpress.com/

---------------------------------------------------------------------
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] ForceType text/plain works for PHP but not for SSI

Posted by "Ali, Saqib" <do...@gmail.com>.
Thanks Joshua!!! That did the trick :-)

saqib
http://doctrina.wordpress.com/

---------------------------------------------------------------------
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] ForceType text/plain works for PHP but not for SSI

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, Jun 2, 2008 at 8:13 PM, Ali, Saqib <do...@gmail.com> wrote:
> Hi Joshua,
>
> This is what I have:
>
> SetHandler server-parsed
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
>
>
> And this doesn't seem to help.
>
> saqib
> http://doctrina.wordpress.com/
>
> On Mon, Jun 2, 2008 at 4:53 PM, Joshua Slive <jo...@slive.ca> wrote:
>> Probably because you are using AddType (an old deprecated method still
>> recommended in the php docs) to activate php but AddHandler (the
>> method recommended by Apache) to activate ssi. The handler equivalent
>> is
>> SetHandler default-handler
>> or (assuming that ssi is activated for .shtml files)
>> RemoveHandler .shtml

Oops. Yep, my message was also behind-the-times. mod_include is a
filter, not a handler.

You can use
RemoveOutputFilter .shtml

Joshua.

---------------------------------------------------------------------
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] ForceType text/plain works for PHP but not for SSI

Posted by "Ali, Saqib" <do...@gmail.com>.
Hi Joshua,

This is what I have:

SetHandler server-parsed
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


And this doesn't seem to help.

saqib
http://doctrina.wordpress.com/

On Mon, Jun 2, 2008 at 4:53 PM, Joshua Slive <jo...@slive.ca> wrote:
> Probably because you are using AddType (an old deprecated method still
> recommended in the php docs) to activate php but AddHandler (the
> method recommended by Apache) to activate ssi. The handler equivalent
> is
> SetHandler default-handler
> or (assuming that ssi is activated for .shtml files)
> RemoveHandler .shtml

---------------------------------------------------------------------
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] ForceType text/plain works for PHP but not for SSI

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, Jun 2, 2008 at 7:15 PM, Ali, Saqib <do...@gmail.com> wrote:
> I have the following defined for port 81 on a web server that has
> WebDAV enabled. This forces the httpd to send PHP files "unparsed".
>    <VirtualHost x.x.x.x:81>
>    DocumentRoot /var/www/html/
>    <Directory /usr/local/apache/htdocs/>
>    DAV On
>   </Directory>
>    ForceType text/plain
>    </VirtualHost>
>
> However it doesn't seem to work for Server Side Includes (SSI). How so?

Probably because you are using AddType (an old deprecated method still
recommended in the php docs) to activate php but AddHandler (the
method recommended by Apache) to activate ssi. The handler equivalent
is
SetHandler default-handler
or (assuming that ssi is activated for .shtml files)
RemoveHandler .shtml

Joshua.

---------------------------------------------------------------------
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