• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfinvoke function

Participant ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

Hi, I am using Godaddy shared hosting and trying to use an image resize script that uses the createobject function. They say that is disabled, but cfinvoke would work.  I have little experience with either of those functions. Does someone know what I would need to do to turn the following code below to work with cfinvoke? I've read some documentation but I still can't understand what I would need to change.

<cfset objInImage=createobject("java","java.awt.image.BufferedImage")>

Thanks,

Brian

TOPICS
Advanced techniques

Views

848

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
community guidelines

correct answers 1 Correct answer

Valorous Hero , May 21, 2009 May 21, 2009

Godaddy's ColdFusion offerings are ColdFusion 7 unfortunatly.

I'm affraid your only likely choice is another hosting provider that better matches your needs.  I'm not even sure that Godaddy would allow you to install any of the custom tags that allowed image manipulations in older verions of ColdFusion.  While I happily use Godaddy for my personal vanity site.  I recognize them as offering a very limited version of ColdFusion and do not rely on their custermer support for anything.

Votes

Translate

Translate
Valorous Hero ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

I'm sorry.  As far as I know, and a quick Google search can tell me, one can not use <cfinvoke...> for java objects.  <cfinvoke...> and the createObject() functions are quite interchangeable for ColdFusion components.  But java objects are a different beast that requires either createObject() or <cfobject...> to access.

Unfortunately the very reason these two functions are disabled is that access to the underlining java on a shared host would allow malicious developers to gain more control of the server then they should have and to hack or interfere with the other clients sharing the server.  As far as I know there is no way to allow access to only benign java objects such as java.awt.image.BuffereImage and not dangerous ones such as coldfusion.server.ServiceFactory.

Votes

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
community guidelines
Advocate ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

I do not believe you can use cfinvoke directly on Java objects, you'd need either createObject, as you already have, or cfobject. Did they disable cfobject as well?

Are you on CF7 or 8? If your host has CF8, you can use the new cfimage tag to quickly and easily resize your image. On 7, you can try ImageCFC but it'll probanly have the same issue you're experiencing since it relies on CF's Java libraries:

http://imagecfc.riaforge.org/index.cfm

Votes

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
community guidelines
Valorous Hero ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

Godaddy's ColdFusion offerings are ColdFusion 7 unfortunatly.

I'm affraid your only likely choice is another hosting provider that better matches your needs.  I'm not even sure that Godaddy would allow you to install any of the custom tags that allowed image manipulations in older verions of ColdFusion.  While I happily use Godaddy for my personal vanity site.  I recognize them as offering a very limited version of ColdFusion and do not rely on their custermer support for anything.

Votes

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
community guidelines
Participant ,
May 21, 2009 May 21, 2009

Copy link to clipboard

Copied

LATEST

Looks like I need to find another host for things like this.  Thank you guys for the help.

Brian

Votes

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
community guidelines
Resources
Documentation