First, be careful with using the hash tag in a CFML page. Your inline style on the <p> element not only has an incorrect number of hexadecimal characters (you can have 3 or 6 characters, not 5), you also got to be careful when you specify the hash itself. Also, there is no such CSS property as "font-color". I believe you want to use "color", ie:
<p style="color: ##ccc;">Hello <cfoutput>#firstname#</cfoutput>. It is so nice to see you.</p>
Try that and let me know what you get.
Nope, didn't change anything. I'm still having it say "Hello #firstname#" instead of "Hello Bob"
Did you by chance name this file with a non-ColdFusion extension?
For example, if you write that code and then save the file as anything other than .cfm or .cfml, then ColdFusion never gets the chance to execute the code.
It's saved as .cfm
Please check it, If you get the output as Test -bob;
Looks like CF is not serving pages, and that .cfm pages are being served literally as text files.
1 person found this helpful
Yup. That would be my next guess.
ColdFusion isn't even hitting the request. This could either be that the connector script is not working, as such, ColdFusion is not responsible for handling files it should be handling, or the server environment is preventing ColdFusion from executing (the latter should return in an error, and not just a code dump like we're seeing)
I'm not familiar with Apache, but can you see if there is a "Web Server Configuration Tool" installed? On a Windows/IIS setup, it allows you to add/remove connectors from ColdFusion to the web server. If you have this tool installed, I'd recommend removing the connectors from Apache, and then re-connecting them.
Your code, though not in best practice, should at least be valid (if using what I provided), so for the return to still have CF variables output to the screen means that there's a setup issue.
Are you able to get into the CFIDE Administrator? Usually, the URL is: http://serverHostname/CFIDE/administrator/index.cfm (or http://serverHostname:8500/CFIDE/administrator/index.cfm for standalone installs)
I don't have a "Web Server Configuration Tool" installed, or at least can't find it. Maybe that's whats causing it? And I still get a code dump with the example you gave.
Usually, when you install CF10, a browser needs to open up so the server can finish up the configuration of the installation. Afterwards, it usually takes you to the Administrator. Did you get to this step? Have you ever logged into the CF Administrator?
Yes, I have.