Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

mod_perl questions

by peschkaj (Pilgrim)
on Oct 30, 2002 at 14:18 UTC ( [id://209073]=perlquestion: print w/replies, xml ) Need Help??

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

I am working on getting perl re-installed on some of our HP-UX machines. I've managed to build it in a side directory (/home/me/bin to be precise) so that it doesn't much with any vendor supplied software and I am looking into creating some webservices. The only problem is that they seem to require mod_perl, which I am entirely clueless about at the moment.

This raises a few questions for me:

  • When I install mod_perl, will this affect any current programs that may be out there using /usr/bin/perl use CGI?
  • How can I be assured which copy of perl will be built into mod_perl
  • Could the installation of mod_perl cause anything to become broken or funny with other CGI (non-Perl) interactions?
  • My biggest fear is that some of our vendor-supplied code may be messed with by installing mod_perl into apache. like I said, mod_perl is completely new to me. Thanks for all the assitance.

    If you make something idiot-proof, eventually someone will make a better idiot.
    I am that better idiot.

    Replies are listed 'Best First'.
    Re: mod_perl questions
    by blokhead (Monsignor) on Oct 30, 2002 at 15:08 UTC
      Not to worry, peschkaj! You can easily restrict mod_perl operation to just a directory, or even just certain scripts. I have a .htaccess file that I use to turn on mod_perl for just two scripts, frontend and backend, that I put in their directory:
      <FilesMatch "^backend|^frontend"> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI </FilesMatch>
      The directory where you put this has to have AllowOverride enabled, otherwise you will have to add a corresponding entry into httpd.conf. If you don't want mod_perl anywhere else, make sure you comment any other sections in httpd.conf that turn on SetHandler perl-script.

      blokhead

    Re: mod_perl questions
    by derby (Abbot) on Oct 30, 2002 at 15:09 UTC
      installing mod_perl should not affect /usr/bin/perl at all.

      you can be assured about which copy of perl is build into mod_perl by

      1) configuring it so at build time or

      2) checking the http://your-server/perl-status (if you have not disabled it).

      Now the installation of mod_perl may cause other stuff to run slow because you've bloated the size of your httpd process. Check out the mod perl site for ways to to remedy the bloat problem (two apache servers, one light weight, one mod_perl enabled, proxy between them).

      -derby

    Re: mod_perl questions
    by Aristotle (Chancellor) on Oct 30, 2002 at 15:11 UTC
      mod_perl will only take over scripts you have told it to (usually by way of enabling mod_perl for scripts in a certain directory). Nothing automatic happens, all mod_perl action has to be specifically enabled in the httpd.conf. You can build mod_perl into your Apache and still run everything under mod_cgi if you're so inclined.

      Makeshifts last the longest.

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others pondering the Monastery: (6)
    As of 2024-04-19 11:36 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found