Skip to main content
Participating Frequently
January 22, 2014
Question

cfcompile

  • January 22, 2014
  • 1 reply
  • 1418 views

Cfcompile trashes my templates, using the syntax of in a DOS window:

c:/coldfusion9/bin>cfcompile -deploy C:\coldfusion9\wwwroot C:\ColdFusion9\wwwroot\filestocompile C:\ColdFusion9\wwwroot\filescompiled

Templates compiled no problem in cf7, but both my cf8 and cf9 trash them. When I load them to localhost:8500 to view them, the hash is visible all over the page, looks like hacker-work.

Running cf9 on xpsp3 with jre 7 and css

NE1 have ne ideas?  Sure would appreciate some help.  Thank you.

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
January 23, 2014

First things first. I am on ColdFusion 10, whose directory structure differs from that of ColdFusion 9. However, when I open the file cfcompile.bat in a text edtor, I can see that it requires the definition of CFUSION_HOME. In your particular case, that should be:

CFUSION_HOME=C:/Coldfusion9

Participating Frequently
January 24, 2014

Hello BKBK, Thank you for your response.

I upgraded to CF10, and installed the "Mandatory CF10 Update" and all updates to 13. I made the modification in the cfcompile.bat file as you suggested, but it is still trashing my templates.

There is "hash" all over the template which shows when I view it in the browser. But cfcompile doesn't compile any of the code, it just scatters "hash" all over the page.

Here is an example of the "hash" that is all over the top and bottom of the template, the code in between is untouched:

resizable     setResizable  !x  "  width  $  700  &  (Ljava/lang/String;)I  ( q ) :(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)I s +   ,  setWidth  .d

Is this a problem with Coldfusion or Java?  Does NE1 know?

Sure would be most appreciative of any help.  ~ G

BKBK
Community Expert
Community Expert
January 24, 2014

There is the following line in the cfcompile.bat file of CF 10

set CFUSION_HOME=%~dp0%\..

I let it be. In fact, I use the default file that ships with CF 10.

To recreate your scenario, I copied some CFM files to the directory C:\ColdFusion10\cfusion\wwwroot\filesToCompile. I then ran the DOS command

cfcompile -deploy C:\ColdFusion10\cfusion\wwwroot  C:\ColdFusion10\cfusion\wwwroot\filesToCompile C:\ColdFusion10\cfusion\wwwroot\filesCompiled

I browsed the CFM files in filesToCompile, comparing each to the corresponding file in filesCompared. There was no change, as expected.

There is perhaps something not quite right with your original CFML code. Could you show it to us.