[techtalk] cgi scripts & html output

GeekGrrl geekgrrl at geekgrrl.org
Mon May 15 22:08:15 EST 2000


Okay, the EOF comes from these statements:

print <<"EOF";
html blablahblaah
EOF

This means print all text from the print statement until the text matchs
"EOF"

If you are seeing EOF in the html, you need to be sure that the print
statement is in place referencing the EOF. If it is, run the script with
/path/to/perl -w /path/to/script.pl or /path/to/perl -d /path/to/script.pl

If you need to set variables, setenv QUERY_STRING
<variable>=<value>\&<variable>=<value>\&<etc>

That may not work if you are not using tcsh or csh as your shell. I forget
how to set environmental variables in bash.

On Mon, 15 May 2000, Shelly L. Hokanson wrote:

> 
> hi all -
> 
> question. i've been pulling my hair out on this one (and essentially given
> up on it). i'm about a two-week newbie to implementing cgi scripts written
> in perl. after learning how they reference directories (system vs. url) and
> setting correct permissions, i'm a happy camper. playing with cgi scripts
> left and right.
> 
> found one that has me stuck.
> 
> it's a message forum script, called DForum. here's the link to the actual
> script if anyone wants to look at it.
> http://www.dansteinman.com/dforum/forum
> 
> i got the script and its admin script working (just go up one level in that
> url above to get to the main page for the script), so it's configured
> correctly. here's my problem.
> 
> the author uses the EOF command to tell the script to output html. (what
> does EOF stand for, anyway?). according to him (and the other scripts i've
> played with that use that command), whatever is typed in the EOF section is
> read as html, so it's all typical html markup. good enough. well. one
> particular step in the message forum posting process you input your message,
> then click a "preview" button (form inputs in the html). all fine and dandy,
> but for some reason, this script omits one entire line of the html, where it
> would send the input text to the final post output process. on screen, i see
> everything correctly except where that line would be, it shows
> ">
> obviously the end of the line of html that's being omitted. i can't figure
> out why it's doing it. there's no odd line breaks in the html, and all of
> the variables seem to be referenced correctly in the script.
> 
> here's a link to what the problem is if you want to reproduce it. it's a
> test of a message forum on my techchron.com site:
> http://jove.prohosting.com/~tchron/dforum/forum.pl
> 
> pretend like you're going to post a message, and when you get to the
> "preview" page (where you would click "submit") is where you'll see the odd
> character. if you view the source, you'll see that the final input for the
> body of the message is omitted, and only that last tag bit is shown. compare
> that to the actual script, under the commented heading "prints the preview
> page", you'll see that it looks to be correctly coded html for a form.
> 
> i dunno.
> 
> i've spent over 8 hours trying to figure it out, and it's driving me nuts! i
> tried to give up but there's already such a huge time investment that i'm
> irked by it.
> 
> if there's any programming gurus out there, this is probably a piece of
> cake. unfortunately i only know enough about perl to make me dangerous.  =)
> 
> thanks all,
> 
> shelly
> techchron.com beta 2 - girls are techies too!
> http://jove.prohosting.com/~tchron
> 
> come write for us!
> 
> 
> 
> 
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk
> 






More information about the Techtalk mailing list