in reply to How can i tell if mod_perl is working?

Beyond the excellent suggestions offered by kschwab, I'd suggest you configure perl_mod/apache to use scripts from a separate directory. Only store scripts in the perl_mod directory that you want to run via perl_mod... this way you can be assured your script is being compiled by mod_perl, rather than as a normal cgi. If you're having problems configuring your httpd.conf, here's a snippet from mine. Note that I'm using DSO modules... if your mod_perl is compiled into Apache, ignore the IfModule directive.
PerlModule Apache::DBI PerlTaintCheck On <IfModule mod_perl.c> Alias /p /var/www/p <Directory /var/www/p> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI </Directory> </IfModule>
Good Luck!

-fp

Replies are listed 'Best First'.
Re: Re: How can i tell if mod_perl is working?
by nmerriweather (Friar) on Sep 01, 2002 at 07:54 UTC
    well, i wanted apache to run all cgi under mod_perl -- this isn't a web box, its my tibook running osx

    freaking thing is just 101 nightmares and then some more

    i think i'm just gonna recompile apache on it... i tried kscwab's ideas - which are great. but it was starting a new interpreter. so i asked some friends. they tried too - mod_perl comes prebuilt on osx too - and their machines were just running new interpreters too.

    anyways, thanks for all your help. you're all rockstars in my book. damn osx. this is almost worse than trying to compile python on this machine

      well, i wanted apache to run all cgi under mod_perl
      That's not feasible in any real situtation. CGI is still necessary, both for misbehaving Perl programs that don't play well with Apache::Registry, and for non-Perl programs!

      Remember, Apache::Registry (what most people call "running under mod_perl") is just a tiny bit of mod_perl, and it has very explicit restrictions to accomplish its task. You're definitely not even touching the power of mod_perl until you learn to plug in some more advanced structures, like Apache::Template or writing your own handlers.

      -- Randal L. Schwartz, Perl hacker

      Have you tried ApacheToolbox yet? Wonderful stuff!

      UPDATE:
      Hmmmm, i am not, however, positive that ApacheToolbox will work on an OSX box ... sorry if it does not. :(

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)