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

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