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

eZ debug

Timing: Jan 18 2025 05:14:39
Script start
Timing: Jan 18 2025 05:14:39
Module start 'content'
Timing: Jan 18 2025 05:14:39
Module end 'content'
Timing: Jan 18 2025 05:14:39
Script end

Main resources:

Total runtime0.1766 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 589.0781180.8047
Module start 'content' 0.00810.0065 769.882898.1328
Module end 'content' 0.01470.1618 868.0156529.4531
Script end 0.1765  1,397.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00402.2684200.0002
Check MTime0.00160.8787200.0001
Mysql Total
Database connection0.00100.564210.0010
Mysqli_queries0.126071.36661410.0009
Looping result0.00180.99721390.0000
Template Total0.161491.410.1614
Template load0.00110.627010.0011
Template processing0.160390.760810.1603
Override
Cache load0.00080.450710.0008
Sytem overhead
Fetch class attribute can translate value0.00070.403910.0007
XML
Image XML parsing0.00030.175010.0003
General
dbfile0.00311.7511200.0002
String conversion0.00000.005730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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