|
From: Drew T. <dr...@dr...> - 2002-05-08 05:15:46
|
Chris,
I am doing a fresh install of OI in anticipation of using it in a project.
In getting things ready using postgres I noticed a problem. In
OpenInteract::DBI.pm you have these lines:
if ( $db_info->{db_name} ) {
DEBUG && _w( 1, "Use right database ($db_info->{db_name})." );
my $rv = $db->do( "use $db_info->{db_name}" );
unless ( $rv ) {
my $msg = $DBI::errstr;
$db->disconnect;
die "Use database failed: $msg\n";
}
}
Postgres apparently does not support the "use dbname" syntax because it was
giving me an error. I had db_name set in the [db_info main] section within
server.ini. Changing this to be blank fixed my problem. I don't know if
there is a workaround for this, other than documentation, which seemed a
little scarce in this area. I'll be sure to let you know of anything else I
might find while diving into OI. I look forward to having to reinvent a
much smaller portion of the wheel. :-)
Drew
[drew@nephi OpenInteract-1.40]$ oi_manage
--website_dir=/home/openinteract/home/ test_db
Running test_db...
=========================
DBD::Pg::db do failed: ERROR: parser: parse error at or near "use" at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/DBI.pm line 47.
Status of the database test:
FAILED!:
Status of connection <<main>> (default
connection)
=========================
-- Basic connect: ok
-- Use database: failed -- ERROR: parser: parse
error at or near "use"
-- Create table: not attempted
=========================
Finished test_db!
======================================================================
Drew Taylor | Freelance web development using
http://www.drewtaylor.com/ | perl/mod_perl/MySQL/postgresql/DBI
mailto:dr...@dr... | Contact: jo...@dr...
----------------------------------------------------------------------
Speakeasy.net: A DSL provider with a clue. Sign up today.
http://www.speakeasy.net/refer/29655
======================================================================
|