Where to create generated files

Author Message

Jorge estévez

Thursday 11 March 2010 3:15:14 am

Hello,

I have seveal cronjobs that generate excelfiles xxx.csv

I have no clues where to create those files (somewhere at the site with read access for customers) so that customers can donwload them.

I have tryed at "var" (with 755 permissions) but when trying to "get" the file from the site it gives me an error "you have not enough permissions to access bla bla bla"

Any ideas?

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Christian Rößler

Thursday 11 March 2010 4:11:24 am

Hy,

i think the var-directory is a good place for those 'temporary' files.
The errormessage probably comes from your .htaccess file which restricts the access to files in the var-folder except for pdfs and images.
Perhaps you should post the complete errormessage, try copy'n'paste :-)

If the error is invoked by .htaccess restrictions, edit that file. You can find it in the ezpublish main directory.
Find the following lines and add your csv-files to it:

from:
<FilesMatch "(^index\.php|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$">
to:
<FilesMatch "(^index\.php|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf|var(.+)\.csv)$">

from:
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$ index.php
to:
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf|var(.+)\.csv)$ index.php

That should do the trick. But it is untested, please verify...
Chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

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 19 2025 11:50:00
Script start
Timing: Jan 19 2025 11:50:00
Module start 'layout'
Timing: Jan 19 2025 11:50:00
Module start 'content'
Timing: Jan 19 2025 11:50:00
Module end 'content'
Timing: Jan 19 2025 11:50:00
Script end

Main resources:

Total runtime0.0158 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.1563152.6250
Module start 'layout' 0.00580.0028 741.781339.4453
Module start 'content' 0.00860.0052 781.226689.3047
Module end 'content' 0.01380.0019 870.531330.3047
Script end 0.0157  900.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.3425140.0002
Check MTime0.00127.3101140.0001
Mysql Total
Database connection0.00085.144610.0008
Mysqli_queries0.002716.864330.0009
Looping result0.00000.081710.0000
Template Total0.00159.810.0015
Template load0.00084.960110.0008
Template processing0.00084.833110.0008
Override
Cache load0.00053.228610.0005
General
dbfile0.00074.544280.0001
String conversion0.00000.043940.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