Hi, I've just done this exact thing! Here's what I had to do:
First, read as many docs as you can get your hands on. Start at
http://perl.apache.org Some of the following instructions are tailored
from the docs to fit my machine, YMMV.
1.Install mod_perl and Apache
2.Put these in your http.conf:
Perlrequire /home/httpd/etc/conf/perl-startup.pl
PerlWarn On
PerlModule Apache::DBI
3. Put these things in the perl-startup.pl file
#################################################
# The order of these is important! (See example #
# in Apache::DBI source directory) #
#################################################
#
use Apache::Registry; # => For stuff in "/perl" location
use Apache::Status; # => For "/perl-status"
use Apache::DBI; # => Persistent DB Connections
#
#######################
4. Set up apache to run your mod_perl scripts as registry scripts:
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
allow from all
PerlSendHeader On
</Location>
Good Luck!
--Chris
On Sat, 27 Mar 1999 lorin@stripped wrote:
> Hi i am pretty new to mysql, I want to use mod_perl to keep a connection
> to mysql. Can i just make a module that connects to the DB and load it in
> httpd.conf? If so, what should be the syntax in the module.
> thanks
> -Lkb
| Thread |
|---|
| • mod_perl | lorin | 28 Mar |
| • Re: mod_perl | Hi Doc! | 29 Mar |