Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CGI help needed

Options
  • 08-04-2002 1:10pm
    #1
    Registered Users Posts: 2,051 ✭✭✭


    Lads,

    Haven't done any CGI in a while and need a bit of help.
    Have a look here:
    http://www.greenbrierinn.com/book2.htm
    and tell me why I'm getting an internal server error when I click submit...

    Much apreciated,!


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Internal Server Errors are a pain in the hole, however...

    Q1. What CGI language are you using?

    Q2. What OS are you running on?

    Q3. Have you looked at the logs?

    Q4. What's the '=' about? (...inn.com/=/cgi-bin/GM...)
    adam


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Yeah,
    ....greenbrierinn.com/=/cgi-bin/GMFormMail.pl
    Looks like it may be a problem.

    Get the logs. /var/www/logs/error_log or something similar depending on your OS.

    In fact just ignore my post and read dahamsta's like I didn't :p

    (I'm getting a 404 which is why I think maybe the '=' is the problem)


  • Registered Users Posts: 2,051 ✭✭✭mayhem#


    Originally posted by dahamsta
    Internal Server Errors are a pain in the hole, however...

    Q1. What CGI language are you using?

    Q2. What OS are you running on?

    Q3. Have you looked at the logs?

    Q4. What's the '=' about? (...inn.com/=/cgi-bin/GM...)
    adam

    A1. Perl

    A2. Linux

    A3. Yup, don't make any sense to me...

    A4. mistake (corrected now).

    I'm still stuck on this and it's getting irritating now!
    Just need a mailto form without using the Eircom one the site is using now..
    Any tips?


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Ok, first thing you do is add this to the top of the Perl script, just under the hash-bang (#!/path/to/perl):

    use CGI::Carp qw(fatalsToBrowser);

    That'll print errors to the screen aswell as logging them. Let's see what that spits at us before we go any further.

    adam


  • Registered Users Posts: 2,051 ✭✭✭mayhem#


    Done that, but it doesn't seem to do anything...


  • Advertisement
  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Ok, how about posting the relevant lines from the logs. Run the script a few times from your browser and 'tail' the error_log from the shell.

    adam


  • Registered Users Posts: 2,051 ✭✭✭mayhem#


    It all makes no sense to me.
    Eat your heart out:

    [09/Apr/2002:20:10:18 +0100] "GET /title14.gif HTTP/1.0" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:18 +0100] "GET /GMFormMail%20Example_files/clearpixel.gif HTTP/1.0" 404 307 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:20 +0100] "GET /cgi-bin/GMFormMail.pl?TO=info@bite-ltd.com&SUBJECT=Booking+for+Greenbrier+Inn&RETURN=http%3A%2F%2Fwww.greenbrierinn.com%2Fthanks.htm&Name=&Address1=&Address2=&Address3=&Email=&Telephone=&Fax=&Check+in+Date=1&Check+in+Month=January&Check+in+Year=2002&Check+out+Date=1&Check+out+month=January&Check+out+year=2002&No+of+people=1&Number+of+rooms=1&+type+of+room=Double&Payment+Method=Credit+Card&Credit+Card+Type=&Comments=&FormsButton1=Submit HTTP/1.0" 500 588 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:23 +0100] "GET /title14.gif HTTP/1.0" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:24 +0100] "GET /GMFormMail%20Example_files/clearpixel.gif HTTP/1.0" 404 307 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:25 +0100] "GET /cgi-bin/GMFormMail.pl?TO=info@bite-ltd.com&SUBJECT=Booking+for+Greenbrier+Inn&RETURN=http%3A%2F%2Fwww.greenbrierinn.com%2Fthanks.htm&Name=&Address1=&Address2=&Address3=&Email=&Telephone=&Fax=&Check+in+Date=1&Check+in+Month=January&Check+in+Year=2002&Check+out+Date=1&Check+out+month=January&Check+out+year=2002&No+of+people=1&Number+of+rooms=1&+type+of+room=Double&Payment+Method=Credit+Card&Credit+Card+Type=&Comments=&FormsButton1=Submit HTTP/1.0" 500 588 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:30 +0100] "GET /title14.gif HTTP/1.0" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:31 +0100] "GET /GMFormMail%20Example_files/clearpixel.gif HTTP/1.0" 404 307 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:32 +0100] "GET /cgi-bin/GMFormMail.pl?TO=info@bite-ltd.com&SUBJECT=Booking+for+Greenbrier+Inn&RETURN=http%3A%2F%2Fwww.greenbrierinn.com%2Fthanks.htm&Name=&Address1=&Address2=&Address3=&Email=&Telephone=&Fax=&Check+in+Date=1&Check+in+Month=January&Check+in+Year=2002&Check+out+Date=1&Check+out+month=January&Check+out+year=2002&No+of+people=1&Number+of+rooms=1&+type+of+room=Double&Payment+Method=Credit+Card&Credit+Card+Type=&Comments=&FormsButton1=Submit HTTP/1.0" 500 588 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:35 +0100] "GET /title14.gif HTTP/1.0" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:36 +0100] "GET /GMFormMail%20Example_files/clearpixel.gif HTTP/1.0" 404 307 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:37 +0100] "GET /cgi-bin/GMFormMail.pl?TO=info@bite-ltd.com&SUBJECT=Booking+for+Greenbrier+Inn&RETURN=http%3A%2F%2Fwww.greenbrierinn.com%2Fthanks.htm&Name=&Address1=&Address2=&Address3=&Email=&Telephone=&Fax=&Check+in+Date=1&Check+in+Month=January&Check+in+Year=2002&Check+out+Date=1&Check+out+month=January&Check+out+year=2002&No+of+people=1&Number+of+rooms=1&+type+of+room=Double&Payment+Method=Credit+Card&Credit+Card+Type=&Comments=&FormsButton1=Submit HTTP/1.0" 500 588 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:41 +0100] "GET /title14.gif HTTP/1.0" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:41 +0100] "GET /GMFormMail%20Example_files/clearpixel.gif HTTP/1.0" 404 307 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"
    195.238.44.248 - - [09/Apr/2002:20:10:43 +0100] "GET /cgi-bin/GMFormMail.pl?TO=info@bite-ltd.com&SUBJECT=Booking+for+Greenbrier+Inn&RETURN=http%3A%2F%2Fwww.greenbrierinn.com%2Fthanks.htm&Name=&Address1=&Address2=&Address3=&Email=&Telephone=&Fax=&Check+in+Date=1&Check+in+Month=January&Check+in+Year=2002&Check+out+Date=1&Check+out+month=January&Check+out+year=2002&No+of+people=1&Number+of+rooms=1&+type+of+room=Double&Payment+Method=Credit+Card&Credit+Card+Type=&Comments=&FormsButton1=Submit HTTP/1.0" 500 588 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))"


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    That's your access log. The error log is in the same directory. The name is usually a dead giveaway. :)

    You should probably change the ACTION of your form to POST by the way. GET won't handle as much data as POST.

    adam


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Also, I found that turning warnings on (#!/path/to/perl -w) allows the page to load, and places the errors up on the screen. Which might help a bit. :)


  • Registered Users Posts: 476 ✭✭Pablo


    do you really expect someone to send the cc details over httpd ?


  • Advertisement
Advertisement