Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI form script bug

need a minor bug fix please

         

jondb

12:24 pm on Jul 27, 2003 (gmt 0)

10+ Year Member



Hi-
I've installed the bnbform.cgi from bignosebird.com/cgi.shtml in my cgi-bin to handle my reply forms. On testing the form I get this error message:
-----------------
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

String found where operator expected at E:\web\holytrousers\HTML\cgi-bin\bnbform.cgi line 91, near "if ($fields{'ok_url'} ne ""
Hi Boaz- (Might be a runaway multi-line "" string starting on line 89)
(Missing semicolon on previous line?)
syntax error at E:\web\holytrousers\HTML\cgi-bin\bnbform.cgi line 91, near "if ($fields{'ok_url'} ne ""
syntax error at E:\web\holytrousers\HTML\cgi-bin\bnbform.cgi line 91, next token?
Unrecognized character \x7F at E:\web\holytrousers\HTML\cgi-bin\bnbform.cgi line 91.
------------------------
end of error message
------------------------
The relevant lines from the script itself as I uploaded it are (lines 89 - 94):

if ($fields{'automessage'} ne "") { &answer_back; }

if ($fields{'ok_url'} ne ""){
print "Location: $fields{'ok_url'}\n\n"; exit;
}
else { &thank_you; }

I'm afraid I know nothing of cgi or perl. Can you fix this line for me please?

Thanks

[edited by: jatar_k at 4:37 pm (utc) on July 31, 2003]
[edit reason] delinked [/edit]

Storyteller

1:24 am on Jul 29, 2003 (gmt 0)

10+ Year Member



I bothered to run this code through Perl syntax check and it came out as perfectly valid. There should be something elsewhere that breaks your script.