Forums / Setup & design / S.O.S :) How can I upload an entire folder?

S.O.S :) How can I upload an entire folder?

Author Message

Roy Jonse

Monday 07 August 2006 12:56:09 am

Hi all,

I need some urgent help:
After overiding some tpl files and getting the desired look - I'm in the stage of filling the real content to my site which functions as intranet site.
The problem is that I got a huge number of files and folders and I would like to know if there is a quick and efficient way to upload an entire folder with all its corresponding sub-folders and files in one time. Instead of creating manualy each one of the folders in its right place in the hierarchical tree + creating each one of the files...

I would really appreciate any help,
Thanks in advance,
Roy

Paul Borgermans

Monday 07 August 2006 2:39:39 am

Hi Roy

The webdav interface is made for this:

http://ez.no/doc/ez_publish/technical_manual/3_8/features/webdav

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Roy Jonse

Monday 07 August 2006 4:07:51 am

Thanks Paul for the quick response!

I tried to read the documentation about this feature.
Before I try to fix it on my system I want to know if I understand you correctly -
From the webdav if I upload from the local machine a folder which contains subfolders and files, then all these subfolders and files will automatically be created and uploaded?

By the way - I used the windows installer to install the ezPublish on my server and now I'm trying to enable the webdav. Is there any help regarding the installation besides the documentation (which is very short and no detailed) ?

Thanks again
Roy

Paul Borgermans

Monday 07 August 2006 4:28:08 am

I tried to read the documentation about this feature.
Before I try to fix it on my system I want to know if I understand you correctly -
From the webdav if I upload from the local machine a folder which contains subfolders and files, then all these subfolders and files will automatically be created and uploaded?

Yes, that's correct

There is not much documentation, but it is not difficult either.

See also http://ez.no/doc/ez_publish/technical_manual/3_8/installation/virtual_host_setup

The snippet below should be enough for your virtual host config:

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

or if you have it/want it on a dedicated port or hostname:

        RewriteRule ^(.*) /webdav.php

instead of calling index.php

hth

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Roy Jonse

Monday 07 August 2006 7:12:27 am

Hi Paul,

First of all I would like to say that I really appriciate your quick response again - thanks a lot!
Unfortunatly I did not get any results... :(
I tried to follow the "Setting it up" instructions + add the snippet you attached but when I get to the final stage of testing it - it does not work.
These are my steps:

1) Installing ezPublish with the <i> windows installer</i>.
2) Enabling the WebDAV server - I changed the following lines straight in "webdav.ini" (no overide) :

[GeneralSettings]
EnableWebDAV=true

3) Adding the desired siteaccesses : (I just added the last line "SiteList[]=webdav" , don't know if it's enough)

[SiteSettings]
SiteList[]
SiteList[]=webdav

4) Configure the web server. this is my ezpublish.conf which is located in- C:\eZpublish\apache\conf\ezpublish.conf

# Enable rewrite rules
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

<VirtualHost *>
<Directory "c:\eZpublish\ezpublish">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
</Directory>
DocumentRoot "c:\eZpublish\ezpublish"

RewriteEngine On
# For all known data directories we let Apache serve it directly
Rewriterule ^/var/storage/.*                                                    - [L]
Rewriterule ^/var/[^/]+/storage/.*                                              - [L]
RewriteRule ^/var/cache/texttoimage/.*                                          - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.*                                    - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.*                   - [L]
Rewriterule ^/share/icons/.*                                                    - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.*                                                - [L]

# Compatability with 3.3 and lower


RewriteRule ^/kernel/setup/packages/.*                                          - [L]

# If not PHP should serve the page
#Rewriterule .* /index.php
Rewriterule .* /webdav.php


ServerName localhost
</VirtualHost>

as you can see I add in the end the line : Rewriterule .* /webdav.php instead of #Rewriterule .* /index.php

5) Now I try to open it from the IE browser : File->open : http://prod/ and checking the Open as webfolder check box. (http://prod/ is the url which leads to homepage of the user_intranet_site)
but I get the following message:
Internet explorer could not open http://prod/ as a webfolder.

What have I done wrong?

Thanks in advance
Roy

Xavier Dutoit

Monday 07 August 2006 8:43:17 am

Hi,

Have a look at the logs in var/webdav.log (or maybe your siteaccess) it should provide you more information.

Otherwise, the idea is to create a new subdomain webdav.domain.com, not to replace the main one, so instead of replacing, that's creating another apache configuration.

X+

http://www.sydesy.com

Roy Jonse

Monday 07 August 2006 10:17:23 am

Hi Xavier,

1) I couldn't find any file with the naem webdav.log - what should I look for in the siteaccess folder?
2) How do I create a new subdomain webdav.domain.com ?

Currently if I understood correctly - I have two sites : intranet_site and intranet_site_admin.
They are located on some machine in my network called "Prod" so right now if I write in the address bar "http://prod" from any other machine in the network it takes me to the Intranet_site login page. and if I write "http://prod/intranet_site_admin" it takes me to the admin login page.
so acctually I have 2 siteaccesses ?
and what should I do next - create a 3rd siteaccess for the webdav?

Thanks again
Roy

Kristof Coomans

Monday 07 August 2006 10:33:19 am

1)
Make sure your webserver has write permissions to $ezroot/var/ and anything beneath it.
Enable WebDAV logging in settings/override/webdav.ini.append(.php):

[GeneralSettings]
Logging=enabled

Now take a look in the webdav.log file under var/log and var/siteaccess/log

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Monday 07 August 2006 2:39:22 pm

Hi,

No, you shouldn't create a 3rd siteaccess. You should create a new sub domain name and associate it with the configuration you described.

On linux, that's a few seconds process to create new domain names and modif the config files of apache for that. It shouldn't be much more complicated do to that on windows.

X+

http://www.sydesy.com

Roy Jonse

Tuesday 08 August 2006 1:08:16 am

Thank you both Kristof and Xavier,

Make sure your webserver has write permissions to $ezroot/var/ and anything beneath it

Kristof - Can you please tell me how do I do that?

Xavier - this is part of my site.ini.append.php file

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=intranet_site
AvailableSiteAccessList[]=intranet_site_admin

MatchOrder=host

//MatchOrder=uri
//HostMatchMapItems[]=intranet_site
//RelatedSiteAccessList[]=intranet_site
//HostMatchMapItems[]=intranet_site_admin
//RelatedSiteAccessList[]=intranet_site_admin
HostMatchMapItems[]=localhost;intranet_site
HostMatchMapItems[]=localhost.admin;intranet_site_admin

and this is my expublish.conf file

# Enable rewrite rules
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

<VirtualHost *>
<Directory "c:\eZpublish\ezpublish">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
</Directory>
DocumentRoot "c:\eZpublish\ezpublish"

RewriteEngine On
# For all known data directories we let Apache serve it directly
Rewriterule ^/var/storage/.*                                                    - [L]
Rewriterule ^/var/[^/]+/storage/.*                                              - [L]
RewriteRule ^/var/cache/texttoimage/.*                                          - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.*                                    - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.*                   - [L]
Rewriterule ^/share/icons/.*                                                    - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.*                                                - [L]

# Compatability with 3.3 and lower


RewriteRule ^/kernel/setup/packages/.*                                          - [L]

# If not PHP should serve the page
#Rewriterule .* /index.php
Rewriterule .* /webdav.php

ServerName localhost
ServerAlias localhost.admin
</VirtualHost>

Can you figure what have I done wrong?
maybe it becouse of my installation? I now see that the installers are only ment for testing and not for production..

Thanks again
Roy

eZ debug

Timing: Jan 18 2025 18:22:31
Script start
Timing: Jan 18 2025 18:22:31
Module start 'content'
Timing: Jan 18 2025 18:22:32
Module end 'content'
Timing: Jan 18 2025 18:22:32
Script end

Main resources:

Total runtime1.6845 sec
Peak memory usage4,096.0000 KB
Database Queries219

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.9609180.8281
Module start 'content' 0.00651.5061 769.7891749.2813
Module end 'content' 1.51270.1718 1,519.0703348.4297
Script end 1.6844  1,867.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2554210.0002
Check MTime0.00150.0905210.0001
Mysql Total
Database connection0.00080.046810.0008
Mysqli_queries1.563592.81402190.0071
Looping result0.00280.16702170.0000
Template Total1.648897.920.8244
Template load0.00240.145020.0012
Template processing1.646497.736620.8232
Template load and register function0.00090.053310.0009
states
state_id_array0.00090.053410.0009
state_identifier_array0.00230.138120.0012
Override
Cache load0.00230.1388990.0000
Sytem overhead
Fetch class attribute can translate value0.00260.155750.0005
Fetch class attribute name0.00320.1874130.0002
XML
Image XML parsing0.00200.118850.0004
class_abstraction
Instantiating content class attribute0.00000.0021150.0000
General
dbfile0.00290.1695400.0001
String conversion0.00000.000530.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
30content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
13content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 70
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs