You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James Xie <Ja...@cogentsystems.com> on 2000/06/12 18:32:11 UTC
Connect to Informix remote DB
I have two Linux (Redhat 6.0) boxes both have Apache 1.3.12 and mod_perl
1.23 installed, one of them (let's call it A box) also has Informix 7.3
installed. I installed DBI module and Informix DBD (1.0) on both machines,
On B box, "make test" for informix DBD went through ok against the database
on A box.
The following DBI script went through ok on A Box, but it failed on B box.
....
my $host = $r->get_remote_host;
my $dbh = DBI->connect("DBI:Informix:esorn");
my $sth = $dbh->prepare("SELECT * FROM user" );
.....
Here is what I got from the error_log on B box:
DBI->connect failed: SQL: -951: Incorrect password or user webuser
is not known on the database server. at /usr/local/esorn/lib
/perl/Apache/TestDBI.pm line 12
webuser is the account I run Apache process.
When I change the script as following:
....
my $host = $r->get_remote_host;
my $dbh = DBI->connect("DBI:Informix:esorn","informix","informix");
my $sth = $dbh->prepare("SELECT * FROM user" );
.....
Here is what I got from the error_log on B box:
DBI->connect failed: SQL: -952: User's password is not correct for
the database server.
The user "informix" with password "informix" do exist on A box.
How do I fix this problem ?
Thanks
James
Re: Connect to Informix remote DB
Posted by Honza Pazdziora <ad...@informatics.muni.cz>.
On Mon, Jun 12, 2000 at 09:32:11AM -0700, James Xie wrote:
>
> I have two Linux (Redhat 6.0) boxes both have Apache 1.3.12 and mod_perl
> 1.23 installed, one of them (let's call it A box) also has Informix 7.3
> installed. I installed DBI module and Informix DBD (1.0) on both machines,
> On B box, "make test" for informix DBD went through ok against the database
> on A box.
...
Do you have correct .rhosts set on the A box? Does the B box have
sqlhosts that would point esorn to box A?
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------