Forums / Install & configuration / [SOLVED] WebDAV - 3.10.0 - admin - Authentication Failed

[SOLVED] WebDAV - 3.10.0 - admin - Authentication Failed

Author Message

Bernd Winkelmann

Tuesday 06 November 2007 4:19:44 am

hi

i have a problem with WebDAV login

WebDAV server is running -> webdav://webdav.my_site.de -> ger ->login window (admin@mypassword ) -> ok -> reply "Authentication Failed" :-(

what is the problem - why i can't login, username and password are ok

i think that as admin I am a "a valid eZ Publish user that exists for the selected siteaccess"

in webdav.log are not hints about failed login

2007-11-06 12:49:03 : Requested URI is: /ger/ [webdav.php]
2007-11-06 12:49:03 : start path: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:03 : indexdir: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:03 : site ger: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:18 : ========================================
2007-11-06 12:49:18 : Requested URI is: /ger/ [webdav.php]
2007-11-06 12:49:18 : start path: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:18 : indexdir: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:18 : site ger: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:31 : ========================================
2007-11-06 12:49:31 : Requested URI is: /ger/ [webdav.php]
2007-11-06 12:49:31 : start path: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:31 : indexdir: /ger/ [CS:currentSiteFromPath]
2007-11-06 12:49:31 : site ger: /ger/ [CS:currentSiteFromPath]

but i'm wondering to find this in error.log (from moment of failed login) the system tried 5 times to connect with database - what is not used databse - seems that a default entry

[ Nov 06 2007 13:10:57 ] [87.187.193.124] eZMySQLDB:
Connection error: Couldn't connect to database. Please try again later or inform the system administrator.
Access denied for user 'root'@'localhost' (using password: NO)

so it seems that the authentication failes because a wrong database connection is used
if i have setup the database connection in other place instead siteaccess site.ini?
<b>
ok the error from database connection was, because i had not database settings in site.ini overwrite. this i fixed now, but it was not effects to any changes with login problem into webdav as admin</b>

aha ok now i know where the problem - running here php as cgi - the webdav.php is using php authentication - witch is not working in php-cgi
is here a possible solution for me?

thanx for helpful opinions
bernd

Bernd Winkelmann

Tuesday 06 November 2007 10:35:53 am

ok i have found a solution in the community of drupal:-)

it would be fine if the system would be able to run compatible also in cgi mode

2 steps

.htaccess

# workaround for php-auth wich is not working in cgi mode
# flag QSA is here important - otherwise the rule is overwriting a possible existing querystring
RewriteCond %{HTTP:Authorization} .*
RewriteRule ^(.*)$ $1?login=%{HTTP:Authorization}  [QSA]

 

webdav.php

i added after line 164

            // workaround for php-cgi - because php auth not work in this mode
            // requires supplement to .htaccess:
            // RewriteCond %{HTTP:Authorization} .*
            // RewriteRule ^(.*)$ $1?login=%{HTTP:Authorization}
            list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_GET['login'],6) ));

if this will working save?
any hints?

thanx
bernd

Gaetano Giunta

Wednesday 07 November 2007 1:56:00 am

Not only the std way of using authentication credentials does not work in CGI mode, it does not work either with IIS (and I did not test with lighttpd using fastcgi, but it might be broken there, too).

You should file a bug report for it, or see if there is already an open ticket in the ez bug tracker...

Principal Consultant International Business
Member of the Community Project Board