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

password protect cfm files

Guest
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

Hi i have a website being hosted on a server which other clients have access to, is there a way of protecting my files, so they can not be edited, if so what would be the best way to do this?
TOPICS
Advanced techniques

Views

1.6K

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
Explorer ,
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

Hi,
One easiest method is to pre-compile your cfm files using the cfcompile.bat file in the CFSERVERROOT/bin/ folder.

- Prasanth

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
Guest
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

ok many thanks i have found the compiler, but not sure where to set the file locations?

i have tried cfcompile C:/ColdFusion8/wwwroot/website2 C:/ColdFusion8/wwwroot/website2 C:/

but no file is created?

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
Guest
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

ok i have now created the files with the incripted code, i then ftp the files to the websever, and now i get this error

500 coldfusion.runtime.CfJspPage._setCurrentLineNo(I)V

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
LEGEND ,
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

> 500 coldfusion.runtime.CfJspPage._setCurrentLineNo(I)V

Was the machine you compiled (not encrypted, btw) the files on the exact
same CF revision and operating system as the one you're trying to run them
on?

--
Adam

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
LEGEND ,
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

> Was the machine you compiled (not encrypted, btw) the files on the exact
> same CF revision and operating system as the one you're trying to run them
> on?

Oh, and - naturally - the same JVM version. That's probably the most
important one of the three!

--
Adam

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
Guest
Sep 15, 2008 Sep 15, 2008

Copy link to clipboard

Copied

Hi Many thanks

i compiled them on my local machine, as the webserver i am hosting on is shared so i dont have access..

i am running vista with the latest JVM, i am sure the webserver is windows 2000.. what would be the best thing to do?

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
LEGEND ,
Sep 15, 2008 Sep 15, 2008

Copy link to clipboard

Copied

> i compiled them on my local machine, as the webserver i am hosting on is
> shared so i dont have access..
>
> i am running vista with the latest JVM, i am sure the webserver is windows
> 2000.. what would be the best thing to do?

Well in my (limited) experience, one will run into problems if one's
compiling files on on OS and running them on another. I have had problems
compiling on XP and trying to deploy on 2k3. I'm not entirely sure whether
it was a JVM version difference or an OS version different; but would not
expect files compiled on on JVM version to work on another.

You can check your JVM version with this code:

{code}
<cfset oJvm = createObject("java", "java.lang.System")>
<cfdump var="#oJvm.getProperties()#">
{code}

Look @ the java.version value (I guess... there's a few in there that
reflect kinda the same info).

I suppose you could write some code to compile your files progammatically,
using <cfexecute> to call cfcompile.bat. Or check what cfcompile.bat
actually does, and call whatever it is directly. Then you could run that
code on the remote box.

First thing to do though before getting too carried away with that sort of
thing is to get onto the same Java version as the server, and compile the
files as that version, and try again. It might be best to just compile one
test file whilst you're experimenting, to save some time.

--
Adam

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
Guest
Sep 15, 2008 Sep 15, 2008

Copy link to clipboard

Copied

ok thanks the webserver is running version 1.4.2_09

so if i have a higher version how do i roll back to this version?

or would it be easier to use <cfexecute> ? if so how would you write this?

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
LEGEND ,
Sep 15, 2008 Sep 15, 2008

Copy link to clipboard

Copied

heh. it looks to me that even CF version is different on your host!
1.4.xx JVM was used in CF MX 7... CF8 uses 1.6.xx by default...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

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
LEGEND ,
Sep 16, 2008 Sep 16, 2008

Copy link to clipboard

Copied

LATEST
> or would it be easier to use <cfexecute> ? if so how would you write this?

I suggest *you* try and write your own code, and if you have any problems,
show us what you've done, and where it's not working, and then we'll try to
help.

--
Adam

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
LEGEND ,
Sep 14, 2008 Sep 14, 2008

Copy link to clipboard

Copied

> ok many thanks i have found the compiler, but not sure where to set the file
> locations?

Which part are you not sure about?

You need to set the three paths towards the top of the file:

set CFUSION_HOME=C:\ColdFusion8
set J2EEJAR=C:\ColdFusion8\runtime\lib\jrun.jar
set WEBINF=C:\ColdFusion8\wwwroot\WEB-INF

Are those correct, given the descriptions given in the file?

Have you read the docs?
http://livedocs.adobe.com/coldfusion/8/htmldocs/deploying_5.html

--
Adam

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 ,
Sep 16, 2008 Sep 16, 2008

Copy link to clipboard

Copied

Hi,

(I am not sure this will work out or not, Give a try anyway!)...

Just go and delete all the files (i.e, compiled templates) under your "cfclasses" directory, and then do the cfcompile again.

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