/content/download/ not found

Author Message

Damien MARTIN

Monday 14 June 2010 1:30:12 am

Hi there,

I encounter a strange behaviour in eZ 4.0 for now.

A website who have duplicated add the following error :

When I want to download a binary file (avi file), I use an URL like /content/download/300/1545/file/usinage2.avi

But it return a Apache error (404 Not Found).

So if I try index.php/content/download/300/1545/file/usinage2.avi I get an eZ error : Module not found.

On the base website it works without any problems.

Does anyone has an idea of where this error could be from ?

Thanks

NB : The folders/files rights are the same

André R.

Monday 14 June 2010 1:46:16 am

For the first case, issues with other url's as well? Rewrite rules?

For the second case, is the file actually there? Did you copy the storage folders in var?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Damien MARTIN

Monday 14 June 2010 2:01:35 am

Hi André,

For the first case, there is no issue and rewrite rules are OK.

For the second case, the files are there (the var files have been copied).

The things that annoy me the most is the fact that eZ said module not found (there is the link : http://grm.2si-systemes.fr/index.php/content/download/300/1545/file/usinage2.avi)

This is the .htaccess used in the two sites :

php_value allow_call_time_pass_reference 0

<FilesMatch ".">
        order allow,deny
        allow from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|avi|mp3|swf|flv|cur|ani|php|kml|xml|wmv)|var(.+)storage.pdf(.+)\.pdf)$">
        order allow,deny
        allow from all
</FilesMatch>

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

RewriteRule !\.(gif|jpe?g|png|css|js|html|avi|mp3|swf|flv|cur|ani|php|kml|xml|wmv)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

André R.

Monday 14 June 2010 5:59:36 am

the reason is that you have added an very optimistic match for avi files (and many others).
I don't use .htaccess my self, so not sure what is best but it makes apache try to serve the file, and when you add index.php, eZ Publish does not recognize index.php as a module (read the error).
Just try changeing the file type to make sure it falls true the rewrite rules correclty:

http://grm.2si-systemes.fr/index.php/content/download/300/1545/file/usinage2.av

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Damien MARTIN

Wednesday 16 June 2010 2:06:08 am

Hi there,

I just solved the problem changing the download URL from

/content/download/300/1545/file/usinage2.avi

to

/content/download/300/1545/file

Hopes It could help others.

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

Main resources:

Total runtime0.0183 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.0059 587.9141152.6250
Module start 'layout' 0.00590.0045 740.539139.4453
Module start 'content' 0.01040.0054 779.984497.9453
Module end 'content' 0.01580.0025 877.929738.3047
Script end 0.0183  916.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003117.0527140.0002
Check MTime0.00137.1732140.0001
Mysql Total
Database connection0.00074.071310.0007
Mysqli_queries0.003720.457730.0012
Looping result0.00000.114510.0000
Template Total0.002010.710.0020
Template load0.00105.473910.0010
Template processing0.00105.238410.0010
Override
Cache load0.00073.831810.0007
General
dbfile0.00042.185980.0001
String conversion0.00000.093740.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