Re: [SLE] perl question

From: Ulf Rasch (u.rasch_at_seppelec.com)
Date: 09/30/05

  • Next message: James Knott: "Re: [SLE] OpenOffice 2.0"
    To: suse-linux-e@suse.com
    Date: Fri, 30 Sep 2005 22:16:33 +0200
    
    

    On Friday 30 September 2005 19:29, peter thesing wrote:
    [--snip--]
    > >
    > >You should have a look at the apache log files in
    > >/var/log/apache2
    > >Look for error_log and access_log.
    > >There you should find the answer.
    > >
    > >
    > >Ulf
    >
    > Hi
    > from error_log
    > [Fri Sep 30 19:32:50 2005] [error] [client 194.109.22.149] Premature end
    > of script headers: guestbook.cgi
    > still it gives the same error message but no answers
    > from acces_log
    > peter:/var/log/apache2 # tail -f access_log | grep guestbook.cgi
    > 10.0.0.157 - - [30/Sep/2005:19:08:50 +0200] "GET /cgi-bin/guestbook.cgi
    > HTTP/1.1
    > " 500 1005 "-" "Mozilla/5.0 (Windows; U; Win98; nl-NL; rv:1.7.10)
    > Gecko/20050717
    > the file is found
    >
    > but not executed
    > sorry to say but can someone help me to find the answer?
    > thanx

    Well, have you executed your script?
    You should see the output that will be sent to the browser.
    The script you are trying compiles but produces NO output.
    Try this:

    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    print "<html>";
    print "<body>";
    print "<h2>I just wrote my first web page using Perl!</h2>";
    print "</body>";
    print "</html>" ;

    Run the script first from the command line. You should see output.
    If your server doesn't display it as a webpage check the permissions etc.

    In general cgi is quite simple. All standard output will be directed to the
    browser and all errors should go to error_log.
    So just executing the cgi script/program should produce output on the command
    line.

    Ulf

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: James Knott: "Re: [SLE] OpenOffice 2.0"

    Relevant Pages

    • Re: Pipe command output to listbox
      ... I've put together a simple script in Tcl to run another command-line ... DarwinPort's port list all command, ... executing exec correctly. ... |>The error message complains that the number of arguments to ListPackages ...
      (comp.lang.tcl)
    • Re: [SLE] email
      ... command' not 'file'. ... I have created a file called signature and placed it in my home ... You're seeing the contents of the script file because Mozilla can only ... do that -- it can't, AFAIK, paste in the results of executing a script ...
      (SuSE)
    • Re: is there a very simple script interpreter?
      ... yes it will be executed via reflection on the currently executing assembly. ... script that will be interpretted at runtime. ... > look at your object and see if it has a Command corresponding to the ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Single cmd/bash session for all exec() calls - is this possible?
      ... My PHP script executes many bash/cmd commands. ... I need the retrieve informations from previous command before ... executing next command because next command is strongly dependent on ...
      (comp.lang.php)
    • RE: port forwarding with IP TABLES - bad argument
      ... Noah, ... That command should work, as long as the "$PORTFWIP:10700" is on the same ... Try executing it outside the script: ... status") then there may be something odd in the script. ...
      (RedHat)