Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Environment Variables/CGI

Status
Not open for further replies.

JemDogs

Technical User
Apr 14, 2002
2
US
Im having a problem using Environment Variables on Apache. I can run CGI scripts just fine, but anywhere I use an environment variable such as $DOCUMENT_ROOT, instead of printing the Document Root in the output file, it just comes out blank. I am very confused because I dont know why I can run scripts fine but not be able to use environment variables.

I wrote a simple test file to test wether $DOCUMENT_ROOT is being passed to the cgi file, then Ive just been changing settings in my httpd.conf file to try to get it to work. Ive tried chaning handlers etc just to make sure that the file is getting processed correctly.

Ive run out of ideas, I have no idea what could be causing this problem. If anyone has a thought as to whats the matter I would appreciate your input. If you need me to post anything from my httpd file just let me know.

Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top