Forums / Developer / [eztararchivehandler.php] Limit of 99 in $v_stored_filename

[eztararchivehandler.php] Limit of 99 in $v_stored_filename

Author Message

Sébastien Morel

Friday 27 July 2007 9:16:37 am

Hi,

Why does this limit exist ?

For a script I have to compress several images from eZ and very often the length of the filename is too long.

I must hack the lib or I have another way ?

Thanks

Séb

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Ekkehard Dörre

Friday 27 July 2007 9:58:15 am

Hi Sébastien,

there is this enhancement

http://issues.ez.no/IssueView.php?Id=9651&activeItem=1

from last year, but not resolved.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Sébastien Morel

Friday 27 July 2007 1:09:23 pm

Ok, great but anyone knows why 99 ?

I don't believe it's a random value ? Why it's not in a setting configuration file ?

Thanks for your help ;)

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Tobias Struckmeier

Saturday 28 July 2007 2:00:43 pm

Hi Sebastien,

I had the same problem when I worked on the newsletter setup package.
The reason that it is 99 Chars is simply because the tar format does not support more. I guess it was defined somewhere in the past. The fact that you can compress also deeper structures in most systems is the fact that GNU/Tar and the Unix Tar have implemented proprietary extensions to bypass this limitation (two different of course ;) ).
As far as I could research, the implementation in eZ Publish was build compatible to the tar spec. There also had been some patches a long time ago (AFAIKR from Björn Dieding) that have been aimed to allow more characters. But they don't seem to work.

Because the code for that is quite complex and a new eZ Publish version is currently made which which will enable all to use the eZ components (ezcArchive doesn't have this limitation) it was decided to focus the resources on the new version instead fixing this shortcoming.

Anyway, you see the newsletter is working. So here is how I did it.

Because I didn't wanted to add another archive format (find one matching the requirements, licensing issues, and so on...) I decided to flatten the directory structure by a simple trick.
I created a class (eZMatryoshka - funny name heh? ;) ) that utilize an ini file to move the files in the archive to a "higher" location and during installation I move it back where it belongs.
Means I have a file or directory in

ezextension/extension/eznewsletter/design/somewhere/deep/in/the/tree/are/some/templates/waiting/for/inclusion/

which I simply move to:

ezextension/extension/eznewsletter/inclusion/

It would be better to have a ezmatryoshka directory there though. ;)

It was quickly written and could be finetuned I think, but you could give it a try, it should be working for you as well. You can find it in the eznewsletter_site package.

Remember that you have to change the file listing in "package.ezpkg/ezextension/extension-YOUREXTENSIONNAME.xml" in accordance or package the extension after you have applied the "matryoschka transforming".

Hope that helps you further a bit.

[info] Matryoshka as class name i used in the meaning of the russian matryoshka dolls http://en.wikipedia.org/wiki/Matryoshka

eZ debug

Timing: Jan 18 2025 11:41:04
Script start
Timing: Jan 18 2025 11:41:04
Module start 'content'
Timing: Jan 18 2025 11:41:04
Module end 'content'
Timing: Jan 18 2025 11:41:05
Script end

Main resources:

Total runtime0.2709 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0187 589.1016180.7969
Module start 'content' 0.01870.0262 769.898498.1016
Module end 'content' 0.04490.2259 868.0000526.0469
Script end 0.2708  1,394.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00562.0681200.0003
Check MTime0.00220.8088200.0001
Mysql Total
Database connection0.00391.422110.0039
Mysqli_queries0.171563.33621410.0012
Looping result0.00190.69561390.0000
Template Total0.225183.110.2251
Template load0.00240.893110.0024
Template processing0.222782.222310.2227
Override
Cache load0.00180.676410.0018
Sytem overhead
Fetch class attribute can translate value0.00130.488510.0013
XML
Image XML parsing0.00020.072710.0002
General
dbfile0.00311.1514200.0002
String conversion0.00000.001830.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