Forums / Setup & design / Images not working after site was moved

Images not working after site was moved

Author Message

Christian Johansen

Thursday 29 December 2005 5:08:15 am

Hi, I recently moved a site from my local developing maching to our test-server. Everything went smooth except for images. Both machines have Apache 2/Windows and PHP 4.4.1 and eZ 3.7.

Problem is - I can upload images without error, they exist on the server. But eZ does not show a preview of the image in the admin pages, and the images does not show up on the site.

I thought it might be a problem with who's owning the directories and such, so I tried to erase the whole var-directory, letting eZ build it again. Unfortunately this does not work either. Does anyone have any idea if I'm forgetting anything? The rest works like a charm.

Esteban Rodriguez

Thursday 29 December 2005 7:22:47 am

Hi Christian,

Have you changed the name of the directory under var where you store the images for this site? it might be that eZ is looking for the images in the wrong place.
Bear in mind that the path to the images is stored in the database in the following two tables:
ezimagefile
ezcontentobject_attribute

ezimagefile has an field called "filepath", and ezcontentobject_attribute also stores the path in the "data_text" field.

So if you change the path for your images in the var dir, you need to update the database with something like this:

update ezimagefile set filepath=replace(filepath,'OLD_VAR_DIR','NEW_VAR_DIR');
update ezcontentobject_attribute set data_text=replace(data_text, 'OLD_VAR_DIR','NEW_VAR_DIR');

hope that helps,

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Christian Johansen

Thursday 29 December 2005 7:33:11 am

The paths are correct, and I have not changed them. The only thing I tried was to delete the whole var-directory and let eZ rebuild it - then upload an image. Still no luck though. Also, the images are uploaded, just not fetched by eZ. The images comes out like this:

<img src="" width="" height="" alt="" style="border: 0px" />

Esteban Rodriguez

Thursday 29 December 2005 8:10:46 am

Is it possible that GD or Imagemagik are not working in the new server? that might be part of the deal.
Also, I recall needing to clear the image variations for one site in which we had the same problem after moving things around.

Check this post:
http://ez.no/products/ez_publish_...n/troubleshooting/images_do_not_work

hope it helps,

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Christian Johansen

Friday 30 December 2005 11:38:12 am

Thanks alot. It seems that GD and ImageMagick were not installed... D'OH! The link you posted did not work. I'm still having some trouble - does eZ store information about imagemagick or GD somewhere? I may need to update a path or something.

Mark Marsiglio

Friday 30 December 2005 5:10:42 pm

Take a look at your image.ini.append.php in your settings/override folder. There is a setting in there that names the Imagemagick executable/path, and if it is enabled or not.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Christian Johansen

Saturday 31 December 2005 2:34:23 am

Thank you so much! It works perfectly now :)

Aleksander Medevedev

Wednesday 18 January 2006 1:13:42 am

Hallo!

I have the same problem after moving from Windows version to hosting. I just can't see any pictures processed in ImageMagick on a site.

I tried to edit two files: 1. image.ini.append.php on a settings\override

<?php /* #?ini charset="iso-8859-1"?

[ImageMagick]
IsEnabled=true
ExecutablePath=/usr/local/imagemagick/bin
Executable=convert
*/ ?>

2. setup.ini.append on a settings\override

[image_conversion]
TestList=imagemagick_program
Require=one

[imagemagick_program]
unix_Executable=convert
unix_SearchPaths=/bin;/sbin;/usr/bin;/usr/sbin;/usr/local/bin;/usr/local/sbin
unix_ExcludePaths=/usr/local/imagemagick/bin/convert

I have got a message from hosting administrator that ImageMagick executable has following path:
Executable=/usr/local/imagemagick/bin/convert

I have following errors on debug log:


Error: eZImageManager::createImageAlias Jan 18 2006 10:59:20
Failed converting var/plain/storage/images/galleries/misc_flowers/blue_flower/260-1-eng-GB/blue_flower.jpg to alias original in directory var/plain/storage/images/galleries/misc_flowers/blue_flower/260-1-eng-GB


Error: eZImageManager::createImageAlias Jan 18 2006 10:59:20
The reference alias original file var/plain/storage/images/galleries/misc_flowers/yellow_flower/266-1-eng-GB/yellow_flower.jpg does not exist

Error: Jan 18 2006 10:59:20
Original alias does not exists, cannot create other aliases without it

But I still can’t see any pictures!!! :(
Please help me!

Esteban Rodriguez

Wednesday 18 January 2006 5:03:45 am

Your .ini settings seem to be ok (don't know about your setup.ini.append, I've never seem to have needed to override that).

From the errors you're getting I would guess there might be some problem with the permissions in the var dir.
I had some similar problem on a migration, I later found I had forgotten to copy the var directory altogether.

I have great faith in fools; self-confidence my friends call it.

http://presencia.net