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

Variable output displays variable name, not value

New Here ,
Jun 29, 2015 Jun 29, 2015

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.

TOPICS
Builder

Views

397

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
Engaged ,
Jul 08, 2015 Jul 08, 2015

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.

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
New Here ,
Jul 09, 2015 Jul 09, 2015

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.

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
Engaged ,
Jul 09, 2015 Jul 09, 2015

Copy link to clipboard

Copied

LATEST

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.

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