Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not sure if this is the right StackExchange site to ask this on, but I think it's the closest related to the topic.

I'm running a WebDAV server using Apache's mod_dav on Linux (Ubuntu). I've successfully connected to it with Windows 7. However, when I open the PHP files in an editor, I don't get their source code, but instead their output. Other files, including images, open correctly. Is there any way to fix this issue?

My Apache config:

<Location /webdav/>
        DAV On
        AuthType Digest
        AuthName "WebDAV"
        AuthDigestDomain /webdav/
        AuthDigestProvider file
        AuthUserFile /var/www/webdav/.htdigest
        Require valid-user
share|improve this question
Please show us your Apache configuration section for WebDAV? – quanta Mar 11 '13 at 3:12
Ok, I've edited my post to include my config. – Eric Mar 11 '13 at 3:16
up vote 2 down vote accepted

Remove content type associations for PHP files:

RemoveType .php

If it doesn't work, remove handler:

RemoveHandler .php
ForceType text/plain

or disable PHP:

php_flag engine off
share|improve this answer
This seems to have worked. However, strangely, I can open some PHP files correctly, but not others. The ones I can't open are the ones I opened before I changed the options. Is there some sort of cache I need to clear? – Eric Mar 11 '13 at 3:46
Nevermind, I've decided not to use this method. However, this fixed the problem for the other files, so I'll mark it as the solution. – Eric Mar 12 '13 at 23:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.