perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Bist" <manoj.bi...@gmail.com>
Subject Re: Scripts works under CGI but not under mod_perl
Date Mon, 13 Aug 2007 18:49:48 GMT
 Hi Perrin,

Thanks for the response. The C library is a third party library which does
the following:

- Connect to a server running on port 7000 on the local machine.
- Make an initialize call <==============================This call is
consistently failing under mod_perl.
- Grab binary data returned by the server.

What is most baffling is that the same perl code works fine when run as a
standalone application or as CGI but consistently fails under mod_perl. The
parameters passed to these call are the following:

- a struct which contains a couple of  "character strings"
- pointer to a handle that would be filled up after the call.

I have tried running a standalone perl application that uses the perl
binding under valgrind. However it did not expose memory issues.

The startup.pl that we are using has only 5 lines. I have included it here.

 11     use ModPerl::Registry;
 12     use Apache2::Const;
 13     use CGI qw(-compile :all);
 14     use CGI::Carp ();
 15     1;

- Manoj.


On 8/13/07, Perrin Harkins <perrin@elem.com> wrote:
>
> On 8/13/07, Manoj Bist <manoj.bist1@gmail.com> wrote:
> > I created a perl binding for a third party "C "library using swig. This
> > works fine under CGI but consistently fails under mod_perl.
> > Is there a known set of calls(mulithreading etc.) that is not expected
> to
> > work under mod_perl?
>
> Modules with C code normally work fine with mod_perl.  The only
> generic problems I can think of are ones where you open sockets or
> files in startup.pl and then fork and try to share them.
>
> Can you tell us more about what the C library does and how it fails?
>
> - Perrin
>

Mime
View raw message