Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Please share CGI::Fast experiences

by coolmichael (Deacon)
on Apr 17, 2001 at 09:33 UTC ( #73055=perlquestion: print w/ replies, xml ) Need Help??
coolmichael has asked for the wisdom of the Perl Monks concerning the following question:

I'm not sure if this is the right place for this post, but I hope so.

I have a webserver with Linux-Mandrake 6.2, perl 5.005_03, and apache 1.3.9. I've written a simple script to do database lookups, but it's quite slow and I'd like to speed it up a bit. I've been reading about CGI::Fast and mod_perl. From what I understand it will be easier (less changes to the script) to use CGI::Fast than to rewrite it in mod_perl. I'm not very good with linux, and I've never used patch before.
Do you think it will be better to go with CGI::Fast?
Has anyone had experiences with it, good and bad?
How was installing CGI::Fast? I think I'd need to recompile perl to use it.
Are there any other comments?

[michael@illium michael]# perl -e "use CGI::Fast;" Can't locate FCGI.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i3 +86-linux / usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/l +ib/perl5/s ite_perl/5.005 .) at /usr/lib/perl5/5.00503/CGI/Fast.pm line 22. BEGIN failed--compilation aborted at /usr/lib/perl5/5.00503/CGI/Fast.p +m line 22. BEGIN failed--compilation aborted at -e line 1.

michael
the blue haired monk

Comment on Please share CGI::Fast experiences
Download Code
Re: Please share CGI::Fast experiences
by Rhandom (Curate) on Apr 17, 2001 at 11:12 UTC
    I don't think I can help you with your installation.

    As for opinions... I love FastCGI. Mod_perl has plenty of benefits, but it also turns everything into a perl process. If you want a really fine tuned server that is optimized for specific cgi's, FastCGI is the way to go. We have used it (FastCGI) on our servers for about two years now. We currently get over 8 million hits a day of dynamic parsed pages (on our web cluster). It wouldn't be possible without FastCGI.

    Either way, if your creating a server that will get hit at all, FastCGI and mod_perl will save you. And both will force you to write perl cleanly.
Re: Please share CGI::Fast experiences
by rbi (Monk) on Apr 17, 2001 at 17:23 UTC
    Hi,
    if it may be of any help, I'm using mod_perl with full satisfaction.
    If you're basically only using CGI.pm, you don't need to change anything in your programs or in Apache directives to refer to the Apache.pm module (at least for latest versions of Apache and mod_perl) and you can pre-load CGI.pm as other modules at Apache startup. All is explained in CGI.pm documentation.
    The best basic installation of mod_perl is the one done at the same time you install Apache: you can make a compilation of mod_perl as explained here, where you also set the directives to enable Apache for mod_perl.

    I just had problems with @INC under Apache, but the installation of mod_perl enlighted me and I discovered things that were not evident to me :)
    In fact, the day you will upgrade your perl from 5.005_03 to - say - 5.6.0, @INC will change but it won't for Apache, and you will have to deal with this, for example giving the PerlSetEnv Perl5LIB directive in httpd.conf to locate the updated @INC directories. All is explained here, anyway.
    After I installed 5.6.0 I didn't know I was using the old perl libraries under Apache, So I was using CGI.pm version 2.73 from prompt and version 2.53 through the browser. :) I should have printed the version of libraries I was using through Apache after the installation of 5.6.0
    I just mention this because I spent more than one hour in the CB with very helpful guys (as usual) before I could find it, and I want to share this info.
    ciao,
    roberto

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://73055]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-09-30 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls