Hi,
I have problems to setup persistent database connection for my perl project using mod_perl.
It tooks me two days which i still cann't figure out how mod_perl works with Apache::DBI.
My Server Settings: ActiveState Perl 5.8.8 build 822 Apache HTTP Server 2.2.9 Apache DBI 1.06 mod_perl 2.03 DBD-Oracle 1.17
--------------Adding to httpd.conf--------------
LoadFile "C:/Perl/bin/perl58.dll"
--------------End-------------------------------------
--------------startup.pl-------------- #!c:/perl/bin/perl.exe
#use Apache::Registry;
my $timeout = 0; Apache::DBI->setPingTimeOut("dbi:Oracle:host=xxx;sid=xxx", $timeout);
1; --------------End-------------------------------------
--------------Apache Startup Log------------------------------------- [Wed Jul 16 14:43:54 2008] [notice] Apache/2.2.9 (Win32) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations --------------End------------------------------------- I can see it sucessful open the oracle DB connection.
However, when I run an CGI script on the IE 6, it cannot find $ENV{MOD_PERL} and start new DBI connection.
--------foo.cgi-------------------- #!c:/perl/bin/perl.exe -d
--------END--------------------
Do I need to do any setting in Apache for $ENV{MOD_PERL}? Did I do any thing wrong in above code?
Thanks and Regards
Chris Z |