Kyle R . Burton on Fri, 23 Feb 2001 10:24:13 -0500 |
> I have a database server and a webserver. > I want to get perl cgi on the webserver to access the MySQL database on the > dbserver. > I have DBI and DBD:mysql installed on the database server and can access > MySQL fine. > > How do I do this from the webserver, from what i see i can't install > DBD::mysql because > MySQL isn't on the webserver. Do I have to network the two machines > together and > point the installation at MySQL on the dbserver. Even if you don't have write access to /usr/lib/perl [or where ever the installation of perl is], you can still install modules. Ater you unpack the tar archive: perl Makefile.PL PREFIX=/path/where/you/have/write/access Then in your perl program, put the line: use lib '/path/where/you/have/write/access'; You may need to tweak the paths a little bit, but this will work. You can just install the modules to an alternate lib path, and then use that lib path. In addition to the 'use lib', you can also set your PERL5LIB enviromnet variable, but it doesn't work with perl's taint checking [which I use religiously]. If you're using mod_perl, you can create a startup.pl and put the use lib line in it, then you won't need it in your individual perl programs. hope this helps. k -- ------------------------------------------------------------------------------ "From a certain point onward there is no longer any turning back. That is the point that must be reached." -- Kafka mortis@voicenet.com http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|