CGI output 0 bytes.

Help
2010-02-25
2013-05-20
  • I am attempting to debug a very simple test file and seem to be having a super simple (I hope) problem.

    The issue is that the script appears to be getting executed but no bytes are being returned. I have installed PadWalker. One thing I am noticing is that "launching" in the lower right hand corner of eclipse never goes beyond 57% - the progress bar is stuck there.

    Here is the script and the console output. I am on Win 7 Ultimate with ActiveState Perl 5.10

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    use CGI::Carp;
    use warnings;
    use strict;
    print <<HTML;
    <html>
    <head>
    <title>A Simple Perl CGI</title>
    </head>
    <body>
    <h1>A Simple Perl CGI</h1>
    <p>Hello World</p>
    </body>
    HTML
    exit;
    
    LOG: 3 5004-0:0:0:0:0:0:0:1-2: Request 0 GET /cgi-bin/test.pl HTTP/1.1
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: main.: invoking handler: cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: suffix=.pl root=C:/Users/cjensen/Documents/eclipseworkspace/OfficepoolsClassic url: /cgi-bin/test.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: Checking for suffix: .pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: looking for: C:\Users\cjensen\Documents\eclipseworkspace\OfficepoolsClassic\cgi-bin.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: looking for: C:\Users\cjensen\Documents\eclipseworkspace\OfficepoolsClassic\cgi-bin\test.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: found: C:\Users\cjensen\Documents\eclipseworkspace\OfficepoolsClassic\cgi-bin\test.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-2: CGI output 0 bytes.
    LOG: 3 5004-0:0:0:0:0:0:0:1-2: request done
    LOG: 4 5004-0:0:0:0:0:0:0:1-2: socket close
    LOG: 3 5004-0:0:0:0:0:0:0:1-3: Error: 408 Request Time-out: Read timed out
    LOG: 4 5004-0:0:0:0:0:0:0:1-3: socket close
    

    Thanks for your help!

    Christian

     
  • Jan Ploski
    Jan Ploski
    2010-02-25

    This may be a firewall issue (EPIC uses ports 5000-5004).

    To check whether the script is really run, append a debugging statement that writes to a file and check whether the file was written.