in reply to Blackjack.pl/cgi

Maybe if you tell us about the problems, instead of just pasting in the code ....
--
Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
>>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<

Replies are listed 'Best First'.
Re: Re: Blackjack.pl/cgi
by ZiaTioN (Novice) on Feb 02, 2003 at 10:35 UTC
    well the problem is I get a server error when I try to load the page. As you can probably tell from my post and the code alone that this is not a command line script. All I get is an Internal Server Error.
      hmmm - no syntax errors, and if I run it commandline it outputs html.
      If I run it in my appache it works ... well I get told I lose all the time :s

      • Are you really sure the web server configuration is in working order ?
        • Web server understands perl ?
        • Web server has appropriate permissions ?
        • Server has uptodate modules installed ?
      • Did you check the error log for detailed die messages etc. ?
      • Is cgi enabled for the directory where the script is ?
      1) CGI.pm can also be invoked with commandline args instead of

      There really should be a CGI/webserver check-list on perlmonks
      --
      Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
      >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<

        There really should be a CGI/webserver check-list on perlmonks

        Maybe even like this one I posted to tutorials a couple of years ago? ;-)

        CGI Help Guide

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

        Pardus that is weird because I run it and get a servcer error. I thought I didnt have cgi enabled also or maybe a module wasnt installed but i wrote a real simple one to tes this and it ran fine. This program was:
        #!/usr/bin/perl -wT use strict; use CGI qw(:all); my $p = new CGI(); ## Let's just start with the start of our HTML-dokument. print header, start_html("A test-script"), h1("A test script"); ## Let's check what state our script is in. Either the question has ## been answered, or it hasn't. if (param('feeling')) { answer(); } else { ask(); } sub ask { print start_form(), hr, p('How are you feeling?', popup_menu('feeling', ['good', 'bad'])), + # param 'feeling' get's defined as either good or bad p(submit('Choose')), end_form, hr, end_html; } sub answer { my $feeling = param('feeling'); if ($feeling =~ /good/i) { print p("That's nice to hear!"); } else { print p("That's to bad"); } end_html(); }
        Not sure why this one would work and my blackjack game wouldn't. And now you tell me it works on your server?? Weird....