Copy link to clipboard
Copied
I am having an issue where my variable output is displaying the variable name and not it's value. I am currently using a MacBook Pro running OS X Yosemite. I am using ColdFusion Builder 3 to build the code and MAMP to run a local server. I have a very simple output to test whether or not I am getting correct output. The code is as follows:
index.cfm
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
</head>
<body>
<h1> hello world</h1>
<cfset name = "John">
<cfoutput>#name#</cfoutput>
</body>
</html>
After running this code, I receive the result:
hello world
#name#
I am confused on why the variable is displayed as the actual variable name and not its value. When running the exact same code in a windows environment, I receive the result as expected.
Copy link to clipboard
Copied
Did you run the web connector so that Apache knows to send cfm files to ColdFusion for processing? Your code is solid and it should correctly render the variable. What version of ColdFusion are you running? Depending on the version, there were some problems with the connector that required grabbing some additional files and configuring it manually.
Copy link to clipboard
Copied
I don't believe that I have run the web connector, how would I go about doing so? Also, I am running ColdFusion 11. Thank you.
Copy link to clipboard
Copied
For CF11 on a Mac you should be able to follow the Unix instructions for manually setting up a the connector:
Configuring your System - ColdFusion, English documentation - Adobe Learning Resources
Let me know if you run into any problems. There are other options you can pass to wsconfig that might be necessary.