[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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:33:12
Script start
Timing: Jan 30 2025 21:33:12
Module start 'layout'
Timing: Jan 30 2025 21:33:12
Module start 'content'
Timing: Jan 30 2025 21:33:12
Module end 'content'
Timing: Jan 30 2025 21:33:12
Script end

Main resources:

Total runtime0.0314 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.3828151.2422
Module start 'layout' 0.00650.0041 739.6250220.7500
Module start 'content' 0.01060.0191 960.37501,002.0234
Module end 'content' 0.02970.0017 1,962.398433.9922
Script end 0.0313  1,996.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00288.8519140.0002
Check MTime0.00113.6284140.0001
Mysql Total
Database connection0.00082.644010.0008
Mysqli_queries0.003410.729630.0011
Looping result0.00000.041010.0000
Template Total0.00123.910.0012
Template load0.00092.931110.0009
Template processing0.00030.920610.0003
Override
Cache load0.00061.883010.0006
General
dbfile0.005718.022980.0007
String conversion0.00000.028140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs