Coldfusion Server Standalone server displaying source code - coldfusion

I needed to install Coldfusion 8 on my local Windows 7 PC, to do some testing. I took the easy route and installed the Standalone server, which included a built in web server. I didn't really need a fully fledged web server, just needed to test.
So after some time of Coldfusion working fine. It started displaying the source code of the page. In other words, Coldfusion was not parsing the page. Merely displaying the source code.
I've worked out that the following line will make the page display source code
<?xml version="1.0" encoding="utf-16"?>
Even if I remove this line from the source code, the source code is still displayed. So I have to make another .cfm file with all the code except the above line, for it to run.
My question is, how do I clear the Coldfusion Standalone Web Server's cache? I've tried the usual restarting of Coldfusion to no avail.
Update: I eventually used a workaround of just renaming the files ie: testing1.cfm, testing2.cfm. For anyone else getting this issue, just use a standalone web server like Apache.

Have you tried restarting ColdFusion?
Have you tried clearing the cache in your browser?
For what it is worth, I prefer to use a web server even when doing development. I have found that using the CF web server and having all my projects under the CF web root can lead to pathing issues in production.

Not sure if you have already fixed this issue but there is an option in the ColdFusion administrator under the Settings > Caching option. At the bottom is a button named Clear Template Cache Now. Clicking that button will empty (remove) any templates that ColdFusion has cached. The next request to that template will force ColdFusion to recompile it if it has been modified.

Related

ColdFusion 2016 Developer Edition on Windows Case Sensitivity

I just installed ColdFusion 2016 Developer Edition on my Windows 7 laptop and configured it to use the built-in web server. Previously I was using ColdFusion 11.
Now I have a case-sensitivity problem, but only for non-ColdFusion (.cfm) resources. For example, all css and js references are now case-sensitive, whereas they weren't when I was using ColdFusion 11. The same is true for calls to images and plain html files. All cfm files load just fine.
I modified the context.xml file (in the /cfusion/runtime/conf folder) to include <Context AllowLinking="true" caseSensitive="true"> (and yes, I also tried caseSensitive="false") and have restarted several times, but no luck yet.
The 404 error messages specify Apache Tomcat/8.5.11.
Any ideas on how to restore case-insensitivity? Thanks in advance for any help.
I seem to have "fixed" this. I enabled IIS on my laptop and used the Web Server Configuration tool to set it up with ColdFusion. (I also changed the path for the default website in IIS to /cfusion/wwwroot since that's where all my code is.) Everything seems to be working well now, with no case sensitivity for cfm or non-cfm pages. I no longer need to include the port (8500) in the URL for my applications, but do need to include it to reach the CF Administrator.

ColdFusion 11 gives IIS 500.0 error when accessing a .cfc

We are testing our cf code (which all works fine on a CF9 Windows Server 2008 machine) for migration to a CF11 Windows 2012 R2 machine. We have a test machine setup and all the code moved over and so far the cfm pages seem to work fine as well as the Application.cfc page but when we call a cfc via AJAX or we visit the cfc methods directly we get an IIS 500.0 error Application could not be found. If I look in the application.log for CF all I see for the error is "Application could not be found. The specific sequence of files included or processed is: ""
Anybody else run into this?
We had the same problem. We upgraded the Java SE Runtime Environment to 1.8.0_91 from 1.8.0_66, restarted ColdFusion and it fixed the issue. Find your upgrade here:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Renshi, (or for others finding this in the future), is the request which is failing one where your URL referred to a folder off your webroot called /api?
If so, then the error you got is due to a change in CF11 (update 11) which effectively made/api a "reserved url" for CF, in support of the REST services feature added in CF11.
You can implement a workaround to the problem (assuming you don't intend to use CF's REST feature in ANY CF app) by commenting out the few lines that refer to the "/api" servlet-mapping in CF's web.xml file. For more details, see this blog post:
http://chads-tech-blog.blogspot.com/2017/03/coldfusion-2016-broke-my-api-and-how-i.html

Cfm page gets downloaded instead of rendering in the browser

I have done the setup for coldfusion-61.When I try to hit the URL for a cfm page, a download window pops up asking if I want to save the file. This happens in the Internet Explorer. In Mozilla it just shows the code written in the cfm file. I looked up on the internet and what most people suggested was re installation but the issue persists . Any suggestions ?
As your using port 8500 I presume you are using the internal server and do bot gave iis installed?
Are you sure that you chose rhis option during installation?
Also have you checked the service is actually running.
I ran into this on CF10, was in the end an issue with the Application Pool. I had to recreate the pool and could then move forward with other issues.

CSS applied differently on local vs. remote

This is a bit of a long shot given how vague my problem is but I'm at my wit's end here.
Basically on my local machine, my website looks fine. However, once it's deployed to the live server, the CSS is not being applied in the same manner. Some of the overwrites that are happening on my local server are not being replicated on the remote server.
All the CSS files are loading for sure on the remote. Collectstatic command has also been ran.
Has anyone experienced such an issue before? Or does anyone have an guesses as to why this might be happening?
UPDATE
I know which style sheets are causing my problem, reset.css and text.css for those familiar with 960.gs. The thing is the overwrites are working in the right order locally but not on the remote.
It could be a lot of things, but I've had this happen to me before. It could be related to some virtual directories not being set up properly on your dev machine when compared to the production environment (causing some CSS to not load).
Have you used Firebug to see which CSS files are being loaded? You could use the Web Developer Toolbar in firefox to disable individual style sheets to see which is your culprit.
Are you sure there aren't any embedded styles on the remote server that you don't have locally?
Remember that there is a cascading order of priority for which CSS takes precedence in a browser. See: http://www.w3schools.com/css/css_howto.asp (bottom of page "Multiple Styles Will Cascade into One").
Good luck.
clear cache as well as cookies of your browser and recheck it. sometimes if network is slow , page does not download properly. basically css has to take nothing from the server. It may differ from browser to browser.
By default, Intranet sites are displayed in compatibility view in Internet Explorer.
This setting can be disabled

Is there a way to bind my flex builder to my django application

I am trying to create simple flex application, which uses django as a back-end part. Have a question:
Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="http://127.0.0.1:8000"/>
<allow-access-from domain="127.0.0.1"/>
</cross-domain-policy>
Then tried the application again, I got error in console of my FB Error: Request for resource at http://127.0.0.1:8000/go/active/ by requestor from file:///Users/oleg/Documents/FB3/usersList/bin-debug/usersList.swf is denied due to lack of policy file permissions.
I don't know how to fix the error. But also the question is there a way to configure FB3 to put my swf files to the server directly, so I will not need any crossdomain?
Thanks
Oleg
We struggled with this a lot. The Flex security stuff didn't strike me as well built, but perhaps we just had different approaches in mind than Adobe's developers. The solution that worked for us was to serve both the SWF and the dynamic data from the same host and port.
On our development boxes, we tell Apache to serve the SWF from a directory in the workspace, and the dynamic data from a local copy of the app. When we push to production, SWF and app get pushed simultaneously to the same virtual host.
If that's inconvenient for you, the Apache ProxyPass directive can be used to make Apache front for other servers. I've not used that in production, but it's been very handy for developer setups.
I don't know a way to get FlexBuilder to automatically deploy your changed SWF; you could certainly look into an automation approach (like Maven and Flex-Mojos) to make that happen.
That said, getting rid of that error is usually just a matter of adding a policy file to the server.
The second error is caused because you're trying to fetch http resources from a "file" location. My recommendation is that you change your Flex Builder project so it outputs to a location within the Django web site, rather than to the flex-bin directory. This setting can be changed in the properties dialog of the project. Then, you should be able to have your front-end and back-end share the same protocol and domain.