Webdav : Rewriting Rules conflicts : Error 500

Author Message

H-Works Agency

Thursday 07 August 2008 4:36:09 am

Hello,

I am trying to use the webdav extention since 3 years now.

I managed to make it almost work a few times but had never been able to put it in a production environnement.

There is always something going wrong :

- FolderClasses list is not working (adding class gallery for exemple doesn't display)
- Images object are not even showing up
- Uploading mime types recognition doesn't work. It always create a "file" object.
- Webdav access doesn't seem to respect the override process. When i drag an object in webdav, it creates an object but not a node and use a wrong language (default eng-GB).
- MacOsX Transmit is not displaying other classes than "folder"
- Root folders in Webdav are always "Content" and "Media", even if you switched "Content" with another class leading to a 404 error when accessing "Content".

In the one i am trying to build now there is a new problem :

I have a error 500 when trying to access webdav. Apache error log says its a rewriting rules conflict though i just implemented those rules according to the ezp instructions.

In .htacces i have :

RewriteEngine On
RewriteRule content/treemenu/?$ index_treemenu.php
RewriteRule index_treemenu.php - [L]

RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

And in my apache conf i have :

<Directory /home/user/publish_html/ezpublish>
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
</Directory>

ServerName webdav.hworks-agency.com
DocumentRoot /home/user/public_html/ezpublish
RewriteEngine On

RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]

RewriteRule . /webdav.php

When i remove the line :

RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php" webdav connexion works.

Can someone help me with this webdav module ? It would be great to be able to use this feature as it should.

Please don't send me to the ezp doc about webdav. I already know it and its not working.

Thanx !

EZP is Great

Andrew Duck

Wednesday 17 September 2008 12:20:51 pm

Martin,

Personally I would move all your rewrite rules to simplify your setup. According to your apache conf above "AllowOverride None" should disable the use of .htaccess for the ezpublish folder in any case. Disabling .htaccess will provide performance increases.

Try this in your apache conf...

<Directory /home/user/publish_html/ezpublish>
   Options FollowSymLinks Indexes ExecCGI
   AllowOverride None
</Directory>
 
ServerName webdav.hworks-agency.com
DocumentRoot /home/user/public_html/ezpublish
RewriteEngine On
 
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) /webdav.php [L]
 
RewriteRule content/treemenu/?$ index_treemenu.php
RewriteRule index_treemenu.php - [L]
 
RewriteRule !\.(ico|swf|flv|gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php
 
DirectoryIndex index.php

Please note I removed Rewriterule . /webdav.php

Let me know if that helps you out at all.

Regards,
Andrew.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

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 18 2025 19:01:56
Script start
Timing: Jan 18 2025 19:01:56
Module start 'layout'
Timing: Jan 18 2025 19:01:56
Module start 'content'
Timing: Jan 18 2025 19:01:57
Module end 'content'
Timing: Jan 18 2025 19:01:57
Script end

Main resources:

Total runtime0.7798 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0101 588.0547152.6406
Module start 'layout' 0.01010.0036 740.695339.4766
Module start 'content' 0.01380.7644 780.1719548.5078
Module end 'content' 0.77820.0016 1,328.679712.1250
Script end 0.7798  1,340.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5267160.0003
Check MTime0.00150.1976160.0001
Mysql Total
Database connection0.00130.166810.0013
Mysqli_queries0.705990.5148540.0131
Looping result0.00170.2240520.0000
Template Total0.726793.220.3634
Template load0.00290.377520.0015
Template processing0.723892.810520.3619
Template load and register function0.00020.025410.0002
states
state_id_array0.00240.306110.0024
state_identifier_array0.00200.258220.0010
Override
Cache load0.00240.3033350.0001
Sytem overhead
Fetch class attribute can translate value0.00110.140020.0005
Fetch class attribute name0.00190.249140.0005
XML
Image XML parsing0.00230.296520.0012
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00410.5274250.0002
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs