Failed to open stream error for Images in my Opencart website Error Log

293 Views Asked by At

I have a running OpenCart website (OpenCart version 2.3) which is working fine. I decided to check the error log file and discovered it has become very large in size (about 800MB). I had to delete it so a fresh log could start. When I viewed the log file, within minutes, I got a long list of errors just like below:

getimagesize(image/cache/catalog/Canon%20850D%20CRPD%20Rszd-400x400.jpg): failed to open stream: No such file or directory in /home/sitename/public_html/catalog/view/theme/kiaria/template/new_elements/product.tpl on line 36

I checked the file, product.tpl for any error, I found none. I thought maybe the images referenced in the error are broken so I opened the image directory (image/cache/catalog), located the referenced images, opened them and they all opened successfully, unbroken.

enter image description here

The name of the above referenced image in the error log is "Canon 850D CRPD Rszd-83x83.jpg".

File permsission is 0644, folders permission is 0755

What could be wrong?

1

There are 1 best solutions below

0
On

In some UNIX systems there could be an error related to special characters in file names. In your case it could be file name with spaces. Try to use only latin letters, digits, minus "-" and low dash "_" in file names.

Try to rename you original image into "Canon_850D_CRPD_Rszd.jpg", than reattach it in product admin page. Than clear /image/cache/ folder and error log. Might help.