I've just spent the last 30 minutes experiencing a strange issue with 
cfdocument.  I've figured out the problem, but perhaps somebody here can 
explain why this happens.

I had a dev server setup that I normally access just by IP address.  I 
have a number of pages that use cfdocument to generate pdf output.  I 
have never had any issues with this, and when moving the finished files 
up to the production server accessed by domain name everything works fine.

For various reasons, I recently added an entry to my host file on my PC 
so I can access my dev server by a domain name as well.  Then I noticed 
that any images inside my cfdocument code would not appear.  I 
immediately suspected a path issue in the <img> tag, since the web root 
can be different when the server is accessed via IP vs a domain name.  
After looking this over, I noticed I was using all relative links and 
everything should be fine there.  To make matters worse, if I simply 
removed the opening and closing cfdocument tags and just output the 
HTML, the images where fine.  It only occurred when the code was inside 
a cfdocument tag.

I really got confused when I noticed that it was not just with images 
embedded with the <img> tag, but also with images generated by CF using 
cfchart.  This entire time, any text on the page would output correctly, 
just no images.  However, if I accessed the server by IP again, 
everything was fine.

I eventually wised up and added the same entry to the host file on the 
dev server as I had on my PC, and the cfdocuments were generating 
correctly.  I was wondering if anyone out there could explain to me why 
the CF engine needs to performa a dns lookup before returning the 
results of a cfdocument?

Thanks
Steve


---
---


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241277
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to