Page 1 of 1
Problem displaying images
Posted: Mon Dec 22, 2008 1:55 pm
by Jacob
Hi
I am using V 0.7.9
I have read all other posts related to uploading images that I can find, but still don't have an answer to my problem.
In admin/catalog/images I click 'Insert' then give 'image title' and 'file name', the image appears in the the folder: /www/upload/image but not in admin/catalog/images only 'image title' 'file name' 'date added', so when creating a 'category' or 'product' I am unable to use my images?
Cheers
Re: Problem displaying images
Posted: Mon Dec 22, 2008 9:26 pm
by Qphoria
There is no such folder as "admin/catalog/images"
Images all goto the www/upload/image/ folder so they are common for both sides
I don't understand, you mention a folder, then detail with database values. Are you not seeing the image in the folder? or not seeing the entry in the database?
Re: Problem displaying images
Posted: Mon Dec 22, 2008 9:43 pm
by Jacob
There is no such folder as "admin/catalog/images"
So sorry, I meant when in administration I go to catalog, then image and click insert. I fill in 'image title' and browse for 'file name' click 'Save' and a new image table is created but no image appears for use?
So in the ftp folder on my hosts web server the images are all there as you say: www/upload/image/
Hope that is clearer now

Re: Problem displaying images
Posted: Mon Dec 22, 2008 11:57 pm
by Jacob
Is that any clearer?
Re: Problem displaying images
Posted: Mon Dec 22, 2008 11:59 pm
by Qphoria
do you see the new record for the image on the admin->catalog->image page in admin after you add it? Or are the records not inserting?
OR
Do you just see the name of image but no actual image when you are changing the dropdown box for products and categories?
Re: Problem displaying images
Posted: Tue Dec 23, 2008 12:17 am
by Jacob
Do you just see the name of image but no actual image when you are changing the dropdown box for products and categories?
Yes that's it.
See pic for further clarification.
Re: Problem displaying images
Posted: Tue Dec 23, 2008 1:16 am
by Qphoria
Do you see the new images in your upload/www/image/cache folder?
Should be something like
logo-22x22.jpg
and
uniform-22x22.jpg
If not, check the permissions of the image/cache directory and be sure they are set to something like 755
Re: Problem displaying images
Posted: Tue Dec 23, 2008 2:36 am
by Jacob
No I don't see the images in my /www/image/cache folder, only the default images are there. The permissions are set to 755.
Re: Problem displaying images
Posted: Tue Dec 23, 2008 7:22 am
by Jacob
Anything else I can do??

Re: Problem displaying images
Posted: Tue Dec 23, 2008 8:01 am
by moocowsaget
I just had the same problem. There is something wrong with the permissions. This fix
http://forum.opencart.com/index.php/topic,1891.0.html and
http://forum.opencart.com/index.php/topic,2510.0.htmlworked like a charm for me
Re: Problem displaying images
Posted: Tue Dec 23, 2008 8:10 am
by Jacob
Moocowsaget, can you be a bit more specific? it's quite a long thread and I am not sure which is the solution.
Thanks
Re: Problem displaying images
Posted: Tue Dec 23, 2008 8:31 am
by Jacob
OK, got there in the end! Thanks to Bruce's post:
you will need to change the save function in library\filesystem\upload.php as follows
Code:
function save($key, $file)
{
if (file_exists($file))
{
@unlink($file);
}
$status = @move_uploaded_file($_FILES[$key]['tmp_name'], $file);
if ($status)
chmod($file, 0644);
return $status;
}
link to his post:
http://forum.opencart.com/index.php/top ... ml#msg8824
Thought it seems this was meant to be invcluded in the 0.7.9 V, well I did a clean install ... but I am a newbie

Re: Problem displaying images
Posted: Tue Dec 23, 2008 9:23 am
by Qphoria
a variation was included in 0.7.9 RC5 but it seems to only work for certain servers so we will likely change it back to the numeric chmod code to make it work properly
Re: Problem displaying images
Posted: Tue Dec 23, 2008 2:54 pm
by Jacob
Thanks for all your help Qphoria.
I am nearly there
