mwerner92 has asked for the wisdom of the Perl Monks concerning the following question:
So I'm using CentOS 6.7 and trying to set up a form. I can access the html using my browser, but once I input the information, the output gives me the internal server error. I've been looking for hours and can't find it. The only thing my error log says is this:
My code for the html is as follows:[Fri Oct 16 18:31:35 2015] [error] [client ::1] File does not exist: / +var/www/html/favicon.ico [Fri Oct 16 18:31:36 2015] [error] [client ::1] (2)No such file or dir +ectory: exec of '/var/www/cgi-bin/form.pl' failed, referer: http://lo +calhost/form.html [Fri Oct 16 18:31:36 2015] [error] [client ::1] Premature end of scrip +t headers: form.pl, referer: http://localhost/form.html [Fri Oct 16 18:31:44 2015] [error] [client ::1] (2)No such file or dir +ectory: exec of '/var/www/cgi-bin/form.pl' failed, referer: http://lo +calhost/form.html [Fri Oct 16 18:31:44 2015] [error] [client ::1] Premature end of scrip +t headers: form.pl, referer: http://localhost/form.html
<html> <head> <title> Form Page Example </title> </head> <body background="light_blue_wallpaper.jpg"> <h1> Welcome! </h1> <form action=cgi-bin/form.pl method="get"> Name: <input type="text" name="user" size=40><p> Age: <input type="text" name="age" size=2 maxlength=3><p> Favorite Scripting Language: <br> <input type="radio" name="language" value="Bash">Bash<br> <input type="radio" name="language" value="Perl">Perl<br> <input type="radio" name="language" value="PHP">PHP<br> <input type="radio" name="language" value="Python">Python<br> <p> <input type="submit" value="Submit form"> <input type="reset" value="Clear all fields"> </form> All information submitted is confidental! </body> </html>
And my cgi script is as follows:
#!/user/bin/perl require("cgi-lib.pl"); &ReadParse(*input); print "Content-type: text/html\n\n"; print "<html> <body background=/var/www/html/light_blue_wallpaper.jpg> Hello <b>$input{user}</b><br> Your age: <b>$input{age}</b><br> Your favorite scripting language: <b>$input{language}</b><br> </html> </body>";
Anybody have any ideas? I'm stumped on this and getting frustrated because I feel like it's probably a stupid mistake that i can't catch.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Internal Server Error apache/httpd
by graff (Chancellor) on Oct 17, 2015 at 02:50 UTC | |
by mwerner92 (Novice) on Oct 17, 2015 at 03:07 UTC | |
|
Re: Internal Server Error apache/httpd
by Your Mother (Archbishop) on Oct 17, 2015 at 03:32 UTC | |
|
Re: Internal Server Error apache/httpd
by Anonymous Monk on Oct 17, 2015 at 03:38 UTC |