You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Olds <Mi...@themozone.net> on 2003/01/22 04:55:00 UTC

RE: [users@httpd] Basic CGI setup follow-up

Just out of curiosity I changed back that code a bit at a time until it was
exactly as it started with the exception of the -wT
Can you explain why that would make such a difference, and why between say
my apache of three months ago and today? (Using the Debian Woody...stable
package they may have had one or two updates).

mo

-----Original Message-----
From: Michael Olds [mailto:MikeOlds@themozone.net]
Sent: Tuesday, January 21, 2003 7:29 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Basic CGI setup help needed


OK Gary,
>So, anyway, worry about the script now and not the config.

>Look for missing quotes, parentheses, etc.  Also add -wT and use strict.
>You'll be forced to write cleaner, more "correct" code.

I messed with the code...so as to end up with:

<----------------->OK?<---------------------->
#!/usr/bin/perl -wT
#Environ.cgi - Show environment variables set by the server
#

print    "Content-type: text/html\n\n";
print    "<HTML>

         <HEAD>
         <TITLE>
         Environment Variables
         </TITLE>
         </HEAD>

         <BODY>";
print    "Environment Variables:";
foreach $evar( keys (%ENV)){
   print "<B>$evar:</B> $ENV{$evar}<BR>";
}
print "</BODY></HTML>\n";
<------------------------->
...forgot the use strict. But it worked. I proofread the original three
times against the code in the book I copied it from: Hunt: Linux, Apache Web
Server Administration, page 227...and as I mentioned previously this very
script was working previously. (I checked, I am uploading in ASCII, not
binary) It must be that -wT, because I can't imagine having to put every tag
on a separate line to make a cgi script work. I have half a dozen of these
little test scripts and none of them are working...OK, I'll let it go. At
least I have a new idea to work with.

You I would hire to check my setup! Live in the bay area?

Thanks and,
Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org