Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: the 500 error

by dga (Hermit)
on Oct 22, 2004 at 22:21 UTC ( #401709=note: print w/replies, xml ) Need Help??

in reply to the 500 error

A few things to consider. $ct is not defined in your code. use strict; would catch that for you before you uploaded and tried to run the code.

Also in HTML 4 a title is manditory in the head section of the html. (I don't think that is the 500 error source but it will make your page not validate)

I am assuming that since hello world works that the perl is where you think it is (/usr/bin/perl) and that is installed and available to you.

Also, if taint checking is on your script will abort due to the fact that you used $cf from an outside source without untainting it.

Replies are listed 'Best First'.
Re^2: the 500 error
by tachyon (Chancellor) on Oct 23, 2004 at 11:13 UTC

    if taint checking is on your script will abort

    Actually it won't. Taint looks to see if you do dangerous things with external vars. Printing is not dangerous. Invalid HTML will never cause a 500 error BTW.

    [root@devel3 root]# cat #!/usr/bin/perl -wT use strict; use CGI; my $q = new CGI; print $q->header(); my $ct = $q->param('ct'); print $ct; [root@devel3 root]# ./ ct=foo%0A Content-Type: text/html; charset=ISO-8859-1 foo [root@devel3 root]#



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401709]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (1)
As of 2021-06-19 09:07 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (91 votes). Check out past polls.