Skip to main content
Apr 5, 2016 1:00 PM UTC
Question

CGI Variables

Hello,
I have recently installed Coldfusion2016, along with it I've configured the apache server which was installed through xampp.
I'm totally newbie to this all.
As in to check if CGI variables I copied the script ColdFusion Help | Testing for CGI variables written here.
It is showing me output as "CGI variable does not exist".
Can anyone help me out? As in Where can I set CGI variables? Am I Missing something?

Thank You.

This topic is closed to new replies. Start a new post to keep the conversation going.

9 replies

Anit_Kumar
Inspiring
Apr 5, 2016 2:49 PM UTC

Hi Nikhilesh,

Can you share a sample code to repro the behaviour?

Regards,

Anit Kumar

Translate
Apr 6, 2016 6:07 AM UTC

Hello Anit,
As I've mentioned earlier I'm totally newbie to CF, I had copied the script form link ColdFusion Help | Testing for CGI variables just to verify the CGI variables which outputs as CGI variable does not exist. Also I replaced <cfif CGI.varname IS NOT "">  to <cfif CGI.SERVER_NAME IS NOT "">.
I'm also trying to set up ColdFusion server along with IIS. Am I making silly mistakes

Thanks.

Translate
Anit_Kumar
Inspiring
Apr 6, 2016 10:00 AM UTC

Hi Nikhilesh,

The below code should work for you.

<cfif CGI.SERVER_NAME IS NOT "">

CGI variable exists

<cfelse>

CGI variable does not exist

</cfif>

Just to verify that CGI variables are working, I will suggest an easier way. Please try the below and see the result.

<cfdump var="#cgi#">

Regards,

Anit Kumar

Translate