You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Edouard Lagache <la...@canebas.org> on 2003/05/21 21:26:28 UTC

Embperl::Execute within FastCGI app?

Dear Embperl folks,

I'm trying to improve the performance of my greeting card application by
using FastCGI.  I'm using the CGI::Fast interface and the Apache-2
mod_fastcgi module.  Sample FastCGI programs work fine and my script will
bring up the login screen, but anything after that generates the
following weird error: 

FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
5.8.0/i686-linux-thread-multi/Embperl.pm line 109.

Now line 109 is the line with the asterisks below from this snippet of
file Embperl.pm.  

    if (!ref $_ep_param)
        {
        Embperl::Req::ExecuteRequest (undef, { inputfile => $_ep_param,
param => [@_]}) ;
        }
    else
        {
***        Embperl::Req::ExecuteRequest (undef, $_ep_param) ;
        }
    }

Clearly the error has something to do with reassigning IO streams, but
since Embperl works with FastCGI, I wasn't sure why this would be a
problem.  I looked at the call Embperl::Execute in embpfastcgi.pl and
didn't see any special calling convention.  Is there some special trick
to call Embperl from within a fastCGI application?

Thanks in advance for your help!

Peace, Edouard :-)


==================================
Edouard Lagache
Lead Developer, Penguin Greetings
http://pgreet.sourceforge.net/
pgreetdev@canebas.org



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Embperl happy with SpeedyCGI (Re: Embperl::Execute within FastCGI app?)

Posted by Edouard Lagache <la...@canebas.org>.
Dear Gerald (and Embperl users,)

Thanks for getting back to me on this and glad to see 2.0b9!! :-)

No rush on this problem.  I won't doing anything with FastCGI for at
least a month.  FYI though, ... my e-card application that uses Embperl
(Penguin Greetings) runs just great using SpeedyCGI <http://
www.daemoninc.com/SpeedyCGI/>.  While lacking as much configuration
controls, it is much easier to use and just about any script can use it.
 All you need to do to use a standard CGI script as a SpeedyCGI script is
to swap the /usr/bin/perl at the top with /usr/bin/speedy !!  I haven't
tried embpcgi.pl with SpeedyCGI, but since Penguin Greetings makes
basically the same calls, I assume it would work too.

Another trick to throw into the toolbox!

Peace, Edouard :-)

==================================
Edouard Lagache
Lead Developer, Penguin Greetings
http://pgreet.sourceforge.net/
pgreetdev@canebas.org
----------------------------------

Gerald Richter <ri...@ecos.de> wrote at Thu, 12 Jun 2003 23:22:34 +0200

>>
>> FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
>> FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
>> 5.8.0/i686-linux-thread-multi/Embperl.pm line 109.
>>
>> Now line 109 is the line with the asterisks below from this snippet of
>> file Embperl.pm.
>>
>
>The error occurs somewhere in C code that is called via ExecutRequest, which
>in turn calls FCGI::Stream::READ somewhere.
>
>I never have tested fastcgi with Perl 5.8.0, so it might be that something
>has changed in the FCGI.pm interface.
>
>The other thing is that the tie interface of Perl has changed in 5.8.0 and
>FCGI I/O is done via a tied filehandle, so this might be the reason. I
>currently have no test box, with Perl 5.8.0 and fastcgi to check this out.
>Hopefully I will have during next few weeks, but I cannot promise
>
>Gerald
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl::Execute within FastCGI app?

Posted by Gerald Richter <ri...@ecos.de>.
>
> FastCGI: server "/home/httpd/cgi-bin/pgreet.pl.fcgi" stderr: Usage:
> FCGI::Stream::READ(stream, bufsv, len, ...) at /usr/lib/perl5/site_perl/
> 5.8.0/i686-linux-thread-multi/Embperl.pm line 109.
>
> Now line 109 is the line with the asterisks below from this snippet of
> file Embperl.pm.
>

The error occurs somewhere in C code that is called via ExecutRequest, which
in turn calls FCGI::Stream::READ somewhere.

I never have tested fastcgi with Perl 5.8.0, so it might be that something
has changed in the FCGI.pm interface.

The other thing is that the tie interface of Perl has changed in 5.8.0 and
FCGI I/O is done via a tied filehandle, so this might be the reason. I
currently have no test box, with Perl 5.8.0 and fastcgi to check this out.
Hopefully I will have during next few weeks, but I cannot promise

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org