Share » Forums » Install & configuration » Setting up WebDAV... the weird way

Setting up WebDAV... the weird way

Setting up WebDAV... the weird way

Thursday 26 January 2006 9:11:39 am - 3 replies

Author Message

Michael Zeidler

Thursday 26 January 2006 3:47:05 pm

I would say placing the question mark before the slash ( RewriteRule .* /index.php?/$1 ) could make problems, because usually GET-Parameters are placed after it.
Also it would be interessting what pieces of information are shown in the log file placed in ./var/log/webdav.log. Please look what values were assigned to $site and $path as mentioned here http://ez.no/community/forum/install_configuration/setting_up_webdav_on_3_7_4_stable_svn . Maybe there is a relationship between our problems.

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

Sebastian Picklum

Friday 27 January 2006 2:47:24 am

The RewriteRule is completely right as the installation operates in CGI-mode where pages are accessed like this: www.somedomain.net/index.php?/content/view/full/2

The fact that I wasn't aware that the installation was running in CGI-Mode was my whole problem.
So I think our problems aren't that related :-)

I did a few tweaks and now it runs smoothly.
I can even authenticate via http-auth in webdav using the following solution:
Added the following to the WebDAV-RewriteRule:

RewriteRule (.*) /webdav.php/$1?CGI_AUTH_DATA=%{HTTP:Authorization}

Added the following at the top of webdav.php

if((empty($_SERVER['PHP_AUTH_USER']) or empty($_SERVER['PHP_AUTH_PW'])) and isset($_REQUEST['CGI_AUTH_DATA']) and preg_match('/Basic\s+(.*)$/i', $_REQUEST['CGI_AUTH_DATA'], $matc))
       list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode($matc[1]));

Voilá, WebDAV in CGI-Mode works!

sp@php.net

Michael Zeidler

Friday 27 January 2006 6:41:56 am

So basically it was an authentication issue. Unfortunately the webdav-code hasn`t caught the missed information in $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']. Also its right that my problem wasn`t related to yours as my authentication data weren´t lost.
Anyway, congrats ;)

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu