Skip to main content
Inspiring
October 9, 2008
Question

CFIMAGE BUG!

  • October 9, 2008
  • 5 replies
  • 1094 views
Hi all

Im sure someone has posted this question before... however i cant find a fix!
When uploading an image and then resizing using CFIMAGE, i am getting the following CF error from time to time..

An exception occured while trying to write the image.
Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : coldfusion.image.ImageWriter$ImageWritingException: An exception occured while trying to write the image.

I have a really upset client at the moment as thet cant upload products into their online store!

Please can someone assist with a bug fix for this.

Text
This topic has been closed for replies.

5 replies

vksrinu
Inspiring
November 19, 2008
Even me too having the same problem with the builtin cf image functions. so now i have requested the user just upload the images and we are doing manually of resizing.
Inspiring
November 4, 2008
I have the same process in my webpage where upload image and resize it.

This is what I used to get the image:

<cffile action="UPLOAD" filefield="Image" destination="#ExpandPath('../images/')#" nameconflict="Overwrite">
<cfset tem_ext = "." & GetToken(File.ServerFile, 2, ".")>
<cfset imagename = "Image_" & Sku & tem_ext>
<cfset tem_org_path = ExpandPath('../images/') & File.ServerFile>
<cfset tem_new_path = ExpandPath('../images/') & imagename>
<cffile action="Rename" Source="#tem_org_path#" destination="#tem_new_path#">

For resize the image I used CFX Tag:

<CFX_IMAGE ACTION="RESIZE"
FILE="#ExpandPath('../images/#imagename#')#"
OUTPUT="#ExpandPath('../thumb/#imagename#')#"
X="150" Y="200" THUMBNAIL="YES" NAME="thumb">

on my webpage it stores the original image and resize it as a thumbnail and store them on the server
October 26, 2008
I am having the same issue when uploading a file and then trying to use ImageScaleTofit. It works fine on Windows box, but on my server it fails. Is there a way to fix this issue?

This is what i am running:
Server Product ColdFusion
Version 8,0,1,196946
Edition Enterprise
Operating System UNIX
OS Version 2.6.9-freevps-1.5-15.1hugemem
Update Level /opt/coldfusion8/lib/updates/hf801-71557.zip
Inspiring
October 10, 2008
this sounds like the well-known image-locking bug that was fixed in the
latest cfimage hotfix. make sure you have the latest cfimage hotfix
installed (hf801-71557): http://www.adobe.com/go/kb403411

Note 1: you may have this hotfix installed on your server, but it may
not be the latest one: adobe re-issued the hotfix with same number, but
different date. make sure the hotfix is dated August 15 2008. Even
cumulative hotfix 1 for CF801 ( http://www.adobe.com/go/kb403622) does
not include the updated cfimage hotfix.

Note 2: i ran into a weird issue with CF801 (CF8 Update 1) + cumulative
hotfix + cfimage hotfix, when imagescaletofit() function started
crashing the server... i had to un-install the cfimage hotfix and use a
work-around for image locking bug found here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=1358449

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Inspiring
October 10, 2008
> Ensure that the destination directory exists and that Coldfusion has
> permission to write to the given path or file.

So... err... does the destination directory exist, and has ColdFusion got
permissions to write to the given path or file?

And any chance of you posting the code that's erroring?

--
Adam