Hi all!
There are some problem with subj :)
I made Apache-DBI-startup.pl script:
# BEGIN Apache-DBI-startup.pl
Apache::DBI->connect_on_init(
'dbi:Pg:dbname=database;host=database',
'user',
'password',
{
PrintError => 1,
RaiseError => 1,
AutoCommit => 0
}
);
1;
# END Apache-DBI-startup.pl
Then, in httpd.conf:
#------ BEGIN part of httpd.conf
PerlModule Apache::DBI
PerlRequire "/etc/apache2/modules.d/Apache-DBI-startup.pl"
#------ END part of httpd.conf
bash # /etc/init.d/apache start ERROR
bash # tail /var/log/apache/error_log
[Tue Aug 01 13:21:23 2006] [error] Can't locate object method
"connect_on_init" via package "Apache::DBI" (perhaps you forgot to load
"Apache::DBI"?) at /etc/apache2/modules.d/Apache-DBI-startup.pl line
1.\nCompilation failed in require at (eval 5) line 1.\n
[Tue Aug 01 13:21:23 2006] [error] Can't load Perl file:
/etc/apache2/modules.d/Apache-DBI-startup.pl for server
pluton.upts.promtelecom:0, exiting...
Well, when I put "use Apache::DBI" into Apache-DBI-startup.pl script -
no errors.
But I don't see any connections to the Database. I think, that If I use
connect_on_init and have for example 5 apache processes, after starting
of apache I will get 5 database connections.
Best regards,
Vladimir S. Tikhonjuk