PDA

View Full Version : Help with debug statement


auteur
05-06-1999, 09:07 AM
Okay, so I am trying, yet again, another "simple" cgi. :)

I ran the debug program and this is what I got:


Number found where operator expected at /big/dom/x123marketing/cgi-bin/makebook.
cgi line 158, near &quot;<FONT SIZE=/&quot;2&quot;
[nbsp][nbsp](Might be a runaway multi-line &quot;&quot; string starting on line 142)

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1833.
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp](Missing operator before 2?)

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1833.
syntax error at /big/dom/x123marketing/cgi-bin/makebook.cgi line 158, near &quot;<FON
T SIZE=/&quot;2&quot;
In string, @123 now must be written as \@123 at /big/dom/x123marketing/cgi-bin/m
akebook.cgi line 158, near &quot;@123&quot;
Execution of /big/dom/x123marketing/cgi-bin/makebook.cgi aborted due to compilat
ion errors.

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1858.
DB::fake::(/usr/lib/perl5/perl5db.pl:2083):
2083:[nbsp][nbsp][nbsp][nbsp] &quot;Debugged program terminated.[nbsp][nbsp]Use `q' to quit or `R' to restart.&quot;;
[nbsp][nbsp]DB<1>

auteur
05-06-1999, 09:21 AM
Ooops...sorry I accidentally hit send while I was still trying to figure everything out.

So now I have this error:
Loading DB routines from perl5db.pl version 1.01
Emacs support available.

Enter h or `h h' for help.

Illegal character \015 (carriage return) at /big/dom/x123marketing/cgi-bin/makeb
ook.cgi line 2.

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1833.
(Maybe you didn't strip carriage returns after a network transfer?)

Cannot print stack trace, load with -MCarp option to see stack at /usr/lib/perl5
/perl5db.pl line 1858.
DB::fake::(/usr/lib/perl5/perl5db.pl:2083):[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]

And would like assistance understanding what I need to do to change this.[nbsp][nbsp]Help. ...and thank you.

Elizabeth
------------------
Elizabeth M. Miller
Getting You the Attention You Deserve!
www.123marketing.com (http://www.123marketing.com)

Justin
05-06-1999, 12:07 PM
I see a few things...

1) And most importantly - did you upload the file in ASCII mode?

2) It seems you had to put in your email address in a variable somewhere - since the @ is a special character to Perl, you have to put a \ in front of it.

3) The line:

[nbsp][nbsp][nbsp][nbsp] <font size=/&quot;2&quot;

Did you add that in or is that how the script was? It should read:

[nbsp][nbsp][nbsp][nbsp] <font size=\&quot;2\&quot;

Have to put a backslash in front of any of the following characters:

&quot;[nbsp][nbsp] @[nbsp][nbsp] &amp;[nbsp][nbsp] /[nbsp][nbsp][nbsp][nbsp]|[nbsp][nbsp][nbsp][nbsp]\[nbsp][nbsp][nbsp][nbsp]$

There's more than that, but it depends on where you're at - but if you escape a character and it's not needed it won't hurt either - the backslash only tells Perl to take the next character literally - so better safe than sorry :)

Oh, also, not sure about your perl path - the top line of the script should read:

#!/usr/bin/perl

[nbsp][nbsp]- or -

#!/usr/local/bin/perl

Either way will work.

Let me know if this helps :)

------------------
Justin Nelson
FutureQuest Support