Highlighted

cfimage writeToBrowser does not work

Community Beginner ,
Nov 02, 2017

Copy link to clipboard

Copied

Hello,

running:

Coldfusion 2016

Centos Linux 7

program:

<cfimage action="writeToBrowser" source="test.png" format="png" />

displays nothing.

Tag worked in previous version

Brian Erickson

Views

617

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfimage writeToBrowser does not work

Community Beginner ,
Nov 02, 2017

Copy link to clipboard

Copied

Hello,

running:

Coldfusion 2016

Centos Linux 7

program:

<cfimage action="writeToBrowser" source="test.png" format="png" />

displays nothing.

Tag worked in previous version

Brian Erickson

Views

618

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 02, 2017 0
Adobe Community Professional ,
Nov 02, 2017

Copy link to clipboard

Copied

Brian, before concluding this must be some bug in CF (whether unique to your specific image or not), I have some suggestions.

  • Are you saying this really stands alone in a page doing nothing else? If not, try that.
  • And as a sanity check, if you replace the tag with some other tag generating output, like a cfdump of the server scope, does that appear?
  • As yet another sanity check, can you put the file in its own folder, and add a blank application.cfc? That will stop it running any application.cfc or cfm that your code is currently running. Your "blank page" could be influenced by that.
  • if you change the action to "info", and remove the format attribute,and add a structname="myimage", then do a cfdump of myimage, what do you see?

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 02, 2017 0
LEGEND ,
Nov 03, 2017

Copy link to clipboard

Copied

Hi, Charlie, long time no type.    Good to see you, again.

Another possibility could be folder permissions.  We lock down the temp folder that cfimage uses for writeToBrowser, so we can't use it.  Maybe the folder permissions changed during the upgrade process.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2017 0
Adobe Community Professional ,
Nov 03, 2017

Copy link to clipboard

Copied

Hi, sir. Yep, I've been far more active in the CF Admin forum, but as I see most questions here these days are as much about setup or troubleshooting, I figured I'd jump in and start helping here as well.

So when you say "we", do you mean to imply that you work with Brian? Or did you just mean that as another possibility for him to consider?

I will say that one of the reasons I proposed he run the request in a page doing that alone and with a blank application.cfc was that if there was an error, he should see it (whereas some app-level error handler may have been intercepting his request).

Of course, there could still be a server-level error handler (in the CF Admin Settings page, for the "site-wide error handler"), and in that case, Brian, if you still see a blank page and don't see any error, check your CF application.log to see if there is any error there. If you have the Adobe-provided sitewide error handler (the one implemented if one enables the "Secure profile", that will still write an error to the application.log. If you find some custom site-wide error handler, those usually do NOT write the error to the log, though they should (with cflog).

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2017 0
LEGEND ,
Nov 03, 2017

Copy link to clipboard

Copied

charlie@carehart.org  wrote

So when you say "we", do you mean to imply that you work with Brian? Or did you just mean that as another possibility for him to consider?

I do not work with Brian, I used my work environment configuration as a possible alternative reason as to why writeToBrowser isn't working in the current version as opposed to the last version. 

Brian could also use the inidividual application.cfc to cfmail a cfdump of the error, or use cftry/cfcatch to display a cfdump of the cfcatch message on screen, if so triggered.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2017 0
Adobe Community Professional ,
Nov 03, 2017

Copy link to clipboard

Copied

Thanks for the clarification. Was just curious. And yes, indeed he could. 🙂

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2017 0