chorg has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

My workplace has switched to FastCGI (from PHP) I am looking at the programming manuals for that, and I am noting that they are pretty old. Anyone have any tips/experiences to share about using FastCGI?


_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Replies are listed 'Best First'.
Re: Working with FastCGI
by Zoogie (Curate) on Apr 11, 2001 at 21:58 UTC
    I'm currently using FastCGI to implement part of our web application, mainly since mod_perl was not available on our first web host. We're planning to phase out the FastCGI scripts in favor of mod_perl very soon, however.

    About the only tips I can offer are:
    • Use the CGI::Fast module. It nicely takes care of some little quirks of FastCGI and provides a clean interface to CGI.pm.
    • Be very sure to re-initialize all of your variables for every request. This is the same problem that many people have ben coding for mod_perl -- FastCGI scripts, like mod_perl scripts, are persistant, so modified variables may end up hanging around longer than you want them to.

    - Zoogie

Re: Working with FastCGI
by suaveant (Parson) on Apr 11, 2001 at 21:20 UTC
    We use it with some success. Biggest tip... always make sure you clean up your variables... very easy to build a memory leak into FCGI, since everything sticks around that is not scoped. Otherwise I can't think of anything specific, but would be glad to answers questions you may have.
                    - Ant
Re: Working with FastCGI
by SamQi (Beadle) on Apr 11, 2001 at 21:01 UTC

    Something to consider would be suggesting mod_perl isntead of FastCGI. I know that my office has migrated away from FastCGI toward mod_perl, and from what I can tell it's because FastCGI isn't that specatcular.

    That's my two cents.

    Samuel Tesla

      Sad to say - mod perl is not an option - usiing Zeus Web Server.... I've used (and loved) mod_perl before, but not this time.:(
      _______________________________________________
      "Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."