> -----Original Message-----
> From: Joe Grastara [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 09, 2001 7:02 PM
> To: [EMAIL PROTECTED]
> Subject: Can't get DBI to work with mod_perl
>
> I'm having trouble getting a script that uses the DBI module
> to work under
> mod_perl. It works fine at the command line or as a normal cgi script.
[snip]
>
> #!/usr/local/bin/perl
>
> use strict;
> use DBI;
> use CGI
> qw(:standard);
>
> ###Set Local Environmental Variable for Oracle###
>
> $ENV{"ORACLE_HOME"} = "/db/";
this should be done from a BEGIN block, exported globally in /etc/profile,
or as a PerlSetVar in httpd.conf - DBD::Oracle needs it at compile time.
It may be in your local .profile, but apache usually runs as user nobody...
>
> ###Print out some HTML###
>
> print <<HTML_1;
> Content-type: text/html\n
>
> <html> <head> <title>Ph Lookup</title> </head> <body bgcolor=white>
> HTML_1
this may be a typo, but HTML_1 has to be the at the start of the line - no
spaces...
if you are using a recent version of DBD::Oracle on linux and see an error
that has to do with libclntsh.so check out
http://forum.swarthmore.edu/epigone/modperl/grahsehspor
other than that, DBI->trace and perl.apache.org/guide is your friend :)
--Geoff