caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Anders Thøgersen" <anders@bladre.dk>
To: Christoph Bauer <christoph.bauer@lmsintl.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Netcgi_fcgi
Date: Thu, 16 Jul 2009 15:31:03 +0200	[thread overview]
Message-ID: <20090716133103.GA12249@debian> (raw)
In-Reply-To: <BB046CA812535C45BD0029AA9D04BA7906676353@KL-SRV57.lmsintl.com>

Hi,

On 14:58 Thu 16 Jul 2009, Christoph Bauer wrote:
> Hi,
> 
> I don't know the netcgi stuff, but from the message I guess, that
> your HTTP-Header of your script is wrong. Make sure, that
> the first lines of your program are a valid HTTP header, and that
> each line is terminated with \r\n. Before your HTML, there
> should be an empty line (i.e. \r\n\r\n).

I do not think this is the case since these are the example programs
that come with the distribution and so should work out of the box.

I have tried the counter_fcgi and add_fcgi examples under mod_fcgid and
mod_fastcgi with apache2, but I can not get the examples to work.

Under mod_fastcgi I get a slightly different error message:

    [Thu Jul 16 15:05:09 2009] [error] [client 127.0.1.1] FastCGI: comm with server "/home/alt/projects/ocaml/www/counter.fcgi" aborted: idle timeout (30 sec)
    [Thu Jul 16 15:05:09 2009] [error] [client 127.0.1.1] FastCGI: incomplete headers (0 bytes) received from server "/home/alt/projects/ocaml/www/counter.fcgi"

Which suggests that apache and counter.fcgi can see each other, but that the 
communication between the two is somehow not functioning.  

I should mention that I am using the netcgi2 lib from godi-ocamlnet.

Previously I used debians standard ocaml packages, but I am now using
godi exclusively.  Maybe I have somehow linked with something from my
old ocaml installation and in this way messed something up?

I'll keep trying for a while,...

Regards
Anders

> Christoph Bauer
> 
> > -----Original Message-----
> > From: caml-list-bounces@yquem.inria.fr 
> > [mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Anders 
> > Thøgersen
> > Sent: Thursday, July 16, 2009 1:28 PM
> > To: caml-list@yquem.inria.fr
> > Subject: [Caml-list] Netcgi_fcgi
> > 
> > Hello,
> > 
> > I am trying to get the fastcgi examples from netcgi2 to work, 
> > but am having some problems with this.  I am running with 
> > apache2 and mod_fcgid.
> > 
> > I have compiled the counter_fcgi example with ocamlopt and 
> > copied the executable to my fcgid directory.  When pointing 
> > my browser at the url of the binary I get an internal server 
> > error and the logs contain the
> > following:
> > 
> >     [Thu Jul 16 13:20:38 2009] [warn] (104)Connection reset 
> > by peer:  mod_fcgid: read data from fastcgi server error.
> >     [Thu Jul 16 13:20:38 2009] [error] [client 127.0.1.1] 
> > Premature end of script headers: counter.fcgi
> > 
> > I can see that a socket is created for communication between 
> > apache and counter.fcgi, so something is functioning 
> > correctly, and I am unsure what the problem might be.
> > 
> > Any pointers are welcome!
> > 
> > Regards
> > Anders
> > 
> > _______________________________________________
> > Caml-list mailing list. Subscription management:
> > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> > Archives: http://caml.inria.fr
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
> > 
> 
> 


  parent reply	other threads:[~2009-07-16 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 11:27 Netcgi_fcgi Anders Thøgersen
     [not found] ` <BB046CA812535C45BD0029AA9D04BA7906676353@KL-SRV57.lmsintl.com>
2009-07-16 13:31   ` Anders Thøgersen [this message]
2009-07-16 14:27 ` [Caml-list] Netcgi_fcgi Christophe TROESTLER
2009-07-16 15:08   ` Anders Thøgersen
2009-07-17 13:12     ` Christophe TROESTLER
2009-07-17 14:22       ` Anders Thøgersen
2009-07-17 14:33       ` Christophe TROESTLER
2009-07-22 12:57         ` Anders Thøgersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090716133103.GA12249@debian \
    --to=anders@bladre.dk \
    --cc=caml-list@yquem.inria.fr \
    --cc=christoph.bauer@lmsintl.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).