1

I am using cfimage to generate captcha in coldfusion9. In my project there are three environments named dev, stage and production. The captcha image is getting displayed both in dev and production but in stage it is not displaying the image. When I am looking through firebug the 'src' attribute of the captcha image tag is having the path as, '/CFFileServlet/_cf_captcha/_captcha_img-156564442913310989.png' but the image is not displaying.

Please suggest me what could be the possible cause of this problem.

Thanks

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
B S Nayak
  • 170
  • 1
  • 12

2 Answers2

4

If your server is under Apache, you can also do the mapping directly in your Apache conf file:

Alias /CFFileServlet /opt/coldfusion9/cfusion/tmpCache/CFFileServlet
<Directory /opt/coldfusion9/cfusion/tmpCache/CFFileServlet>
    Order allow,deny
    Allow from all
</Directory>
0

Your dev web server not able to find the mapping for the folder 'CFFileServlet'. You can explicitly mention that mapping in the application.cfc file. Like in my case i have created the mapping by

<cfset This.mappings["/CFFileServlet"]="C:\ColdFusion10\cfusion\tmpCache\CFFileServlet">
Abhisek Das
  • 206
  • 1
  • 5