cgicc-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cgicc-help] How to get system environment variable


From: Zheng, Wendy
Subject: Re: [Cgicc-help] How to get system environment variable
Date: Mon, 31 Aug 2015 02:03:43 +0000

Thank you for replying. The issue is fixed by using PASSENV in the apache configuration.

 

Thanks,

Wendy

 

From: Clay Dowling [mailto:address@hidden
Sent: Friday, August 28, 2015 10:57 PM
To: Zheng, Wendy
Subject: Re: [Cgicc-help] How to get system environment variable

 

If getenv isn't providing it, then MY_FAMILY isn't defined in your program's runtime environment. getenv from libc is the definitive answer on whether or not something is in the environment.

 

On Fri, Aug 28, 2015 at 2:29 AM, Zheng, Wendy <address@hidden> wrote:

Hi expertise,

 

I’m trying to read system environment variable from my cgi application. I try following methods, but it doesn’t work. Does anyone know how to do it?

1.

char *family =  getenv ("MY_FAMILY");

if (family != NULL)

{

  SERVICE_DEBUG(family);

} else {

  SERVICE_DEBUG("Family is null");

}

 

2.

  CgiInput input;

  string family = input.getenv("MY_FAMILY");

  SERVICE_ERROR("MY_FAMILY=" << family);

 

From the document of CgiEnvironment http://www.gnu.org/software/cgicc/doc/classcgicc_1_1CgiEnvironment.html , it looks like we should be able to get the system environment variable. But I can’t find a way to do it.

 

Thanks,

Wendy


_______________________________________________
Cgicc-help mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/cgicc-help

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]