Image saved in var/storage/original/image but does not show on my page

Author Message

Lars Arne Brekken

Wednesday 02 July 2003 3:21:48 am

Searched the forums but couldn't find a solution to this.

In one of my classes I have an Image attribute. When I upload a jpg image it is saved in var/storage/original/image. The problem is that it doesn't show up on the pages.

It doesn't show up in admin mode either. When I choose to edit the object, the HTML is:
<img src= alt="" />

Does anyone know where the error is?

geovanni rosetto

Wednesday 02 July 2003 10:02:59 am

Lars,
I hope you're using eZ publish 3.1 (final release) because previous releases had a bug with the gd library. You might also have to re-assign permissions (system user group or Web server user group) again to your image storage directories.
var/
var/storage/
var/cache/
I ran into this problem myself, but I'm not a Unix/Linux guru. I can't really help you with Unix/Linux permissions.

Good luck,

geo

Øystein Lygre

Wednesday 02 July 2003 11:47:55 am

I changed my values in settings/image.ini to this, and it fixed my problem, which looks much like your problem.

[ConverterSettings]
UseConvert=false
UseGD=true

[Rules]
DefaultRule=image/jpeg;gd
Rules[]=image/jpeg;image/jpeg;gd
Rules[]=image/png;image/png;gd
Rules[]=image/gif;image/png;gd
Rules[]=image/xpm;image/png;gd

Lars Arne Brekken

Friday 04 July 2003 5:06:00 am

Yes, I'm using 3.1 stable.

I'm not using GD, but ImageMagic.

convert works (I've added the complete path in image.ini.append.php)

I've chmod'ed var/ recursively 777, so that's not the cause either.

The original is stored as described in the topic, but nothing is stored in var/storage/reference or var/storage/variations .

I guess that's the problem.

Lars Arne Brekken

Friday 04 July 2003 5:09:13 am

I watched the debug output when I uploaded an image, and here it is:

Undefined variable: lang in /home/apache/htdocs/ez/kernel/classes/ezcontentobject.php on line 469

Warning: PHP Jul 04 2003 14:00:19
Undefined variable: lang in /home/apache/htdocs/ez/kernel/classes/ezcontentobject.php on line 1155

Warning: Jul 04 2003 14:00:19
Exec: /usr/local/bin/convert -geometry "100x100>" var/storage/reference/image//phpGraHdR.jpg jpg:var/storage/variations/image/p/h/p//phpGraHdR_100x100_171.jpg, Err: , Ret: 1

Warning: PHP Jul 04 2003 14:00:19
getimagesize(var/storage/variations/image/p/h/p/phpGraHdR_100x100_171.jpg): failed to open stream: No such file or directory in /home/apache/htdocs/ez/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 234

Warning: PHP Jul 04 2003 14:00:19
filesize(): Stat failed for var/storage/variations/image/p/h/p/phpGraHdR_100x100_171.jpg (errno=2 - No such file or directory) in /home/apache/htdocs/ez/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 249

Error: Jul 04 2003 14:00:19
Could not create variation for var/storage/variations/image/p/h/p/phpGraHdR_100x100_171.jpg

Error: eZTemplate @ design/standard/templates/content/datatype/edit/ezimage.tpl:27[9] Jul 04 2003 14:00:19
Cannot retrieve attribute of a boolean

I noted that there's a double slash in some of the paths (e.g. var/storage/reference/image//phpGraHdR.jpg jpg:). Could that be a bug?

Tony Wood

Friday 04 July 2003 12:21:10 pm

Hi Lars,

Can you try and run convert from the command line. From the looks of it it looks like its not able to create the image. Also if you can run convert from the command line, try uploading a new image to test it. I know from older versions the image variation db records hung around giving you false reports.

I hope this helps

--tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Lars Arne Brekken

Monday 07 July 2003 12:37:53 am

Thanks for your reply, Tony.

I was able to run convert from the command line (the help screen showed up). Didn't try with any images though. I have to say I suspect a bug in eZ publish.

After a lot of trying, I resigned and installed GD. Works like a dream.

Lars

Bård Farstad

Monday 07 July 2003 12:44:36 am

Lars, you can try to add the full path to convert. Since you're able to run convert on the command line it's probably a path issue.

--bård

Documentation: http://ez.no/doc

Karsten Jennissen

Monday 07 July 2003 12:46:52 am

Even though GD works now, did you try this with ImageMagick?
http://ez.no/developer/ez_publish_3/documentation/installation_and_configuration/troubleshooting/images_do_not_work/you_are_sure_that_you_have_imagemagick_but_its_not_working

Regards,
Karsten

Lars Arne Brekken

Tuesday 08 July 2003 1:11:25 am

Yes, I've tried this, too. No luck...

Lars

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 11:30:53
Script start
Timing: Jan 18 2025 11:30:53
Module start 'layout'
Timing: Jan 18 2025 11:30:53
Module start 'content'
Timing: Jan 18 2025 11:30:54
Module end 'content'
Timing: Jan 18 2025 11:30:54
Script end

Main resources:

Total runtime0.7725 sec
Peak memory usage4,096.0000 KB
Database Queries86

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.6406152.6563
Module start 'layout' 0.00680.0031 742.296939.4922
Module start 'content' 0.00990.7610 781.7891772.2109
Module end 'content' 0.77090.0016 1,554.000020.0938
Script end 0.7725  1,574.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4529160.0002
Check MTime0.00140.1779160.0001
Mysql Total
Database connection0.00090.115610.0009
Mysqli_queries0.689289.2074860.0080
Looping result0.00090.1200840.0000
Template Total0.737995.520.3689
Template load0.00210.266920.0010
Template processing0.735895.245520.3679
Template load and register function0.00030.035110.0003
states
state_id_array0.00160.205310.0016
state_identifier_array0.00210.270520.0010
Override
Cache load0.00200.2529740.0000
Sytem overhead
Fetch class attribute can translate value0.00080.098560.0001
Fetch class attribute name0.00150.1953120.0001
XML
Image XML parsing0.00150.193160.0002
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00100.1292230.0000
String conversion0.00000.001140.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 46
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs