FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 03-20-2012, 10:06 AM
Mark Dokter
 
Default php files on webdav (SetHandler)

Hi!

I just noticed that the usual way to edit php files through webdav does
not work on my ubuntu server 11.10. The ForceType text/plain is ignored
as is the RemoveHandler .php or RemoveType .php.
After a little trial and error I found out, that a SetHandler None and
ForceType text/plain combination in the DAV location works now the same
way the single ForceType text/plain used to work.
Is it a new apache behaviour, ubuntu specialty or just my installation?

thx, Mark

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 03-22-2012, 05:24 PM
Clint Byrum
 
Default php files on webdav (SetHandler)

Excerpts from Mark Dokter's message of Tue Mar 20 04:06:27 -0700 2012:
> Hi!
>
> I just noticed that the usual way to edit php files through webdav does
> not work on my ubuntu server 11.10. The ForceType text/plain is ignored
> as is the RemoveHandler .php or RemoveType .php.
> After a little trial and error I found out, that a SetHandler None and
> ForceType text/plain combination in the DAV location works now the same
> way the single ForceType text/plain used to work.
> Is it a new apache behaviour, ubuntu specialty or just my installation?
>

On what version did it "used to work" ? This is most likely an apache
behavior change, but its hard to determine that if we don't know at what
point it did work.

Given the documentation seen here:

http://httpd.apache.org/docs/2.2/mod/mod_mime.html#removehandler

I would expect "RemoveHandler .php" to do the same thing as SetHandler
None, though I do notice that ForceType and SetHandler are both in core,
while RemoveHandler and RemoveType are in mime.. so is it possible you
don't have the mime module enabled (should be on by default)?

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 03-27-2012, 09:26 AM
Mark Dokter
 
Default php files on webdav (SetHandler)

On 3/22/12 7:24 PM, Clint Byrum wrote:
> Excerpts from Mark Dokter's message of Tue Mar 20 04:06:27 -0700 2012:
>> Hi!
>>
>> I just noticed that the usual way to edit php files through webdav does
>> not work on my ubuntu server 11.10. The ForceType text/plain is ignored
>> as is the RemoveHandler .php or RemoveType .php.
>> After a little trial and error I found out, that a SetHandler None and
>> ForceType text/plain combination in the DAV location works now the same
>> way the single ForceType text/plain used to work.
>> Is it a new apache behaviour, ubuntu specialty or just my installation?
>>
>
> On what version did it "used to work" ? This is most likely an apache
> behavior change, but its hard to determine that if we don't know at what
> point it did work.
>

It used to work on an ubuntu 9.04 installation with apache 2.2.11 and
does not on 11.10 with apache 2.2.20. The workaround to access php files
via webdav with ForceType text/plain is documented in
http://httpd.apache.org/docs/2.2/mod/mod_dav.html. This *should* be
valid for both versons?!

> Given the documentation seen here:
>
> http://httpd.apache.org/docs/2.2/mod/mod_mime.html#removehandler
>
> I would expect "RemoveHandler .php" to do the same thing as SetHandler
> None, though I do notice that ForceType and SetHandler are both in core,
> while RemoveHandler and RemoveType are in mime.. so is it possible you
> don't have the mime module enabled (should be on by default)?
>

The mime module is enabled (was by default). The desired behaviour (read
php code through webdav) is only achieved by the combination of
"ForceType text/plain" and "SetHandler None"

Here's the working config on the ubuntu 11.10 system (generalized):

Alias /dav /srv/data/www/<...site-name...>
<Location /dav>
SetHandler None
ForceType text/plain
Dav On
AuthName "<...site-name...> WebDAV access"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL <...ldap-url...>
require ldap-user <...user-names...>
</Location>

This is what the config looked like on the old ubuntu 9.04 system:

Alias /dav /srv/data/www/<...site-name...>
<Location /dav>
Dav On
AuthName "<...site-name...> WebDAV access"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL <...ldap-url...>
require ldap-user <...user-names...>
ForceType text/plain
</Location>

As you can see, there's not much difference. The sad thing is, that I
had to find that out using trial and error, since all documentation I
found did not solve my problem.
The question now is: is my installation messed up? is it a ubuntu
special behaviour or is it a change in the apache software.

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 08:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org