Mailinglist Archive: opensuse (3618 mails)

< Previous Next >
[opensuse] php and postgres 9.3 vs 10.3
  • From: Robert Paulsen <robert@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 26 Jan 2009 12:12:07 -0600
  • Message-id: <200901261212.08104.robert@xxxxxxxxxxxxxxxxx>
Hello,

I have a SuSE 9.3 system with a postgres database and a php web app that
connects to the datbase. This works fine.

I also have SuSE 10.3 but cannot get php to connect to the database.

9.3 versions:
PHP 4.3.10
postgres (PostgreSQL) 8.0.13

10.3 vesions:
PHP 5.2.6 with Suhosin-Patch 0.9.6.2
postgres (PostgreSQL) 8.2.6

Both have identical pg_hba.conf files.

Database was transferred as recommended using
"pg_dumpall -f > SAVE" as user postgres on 9.3 system
and
"psql template1 -f SAVE" as user postgres on 10.3 system

The php code that is failing is:

$dbh=&$_SESSION['dbh'];
$cstring="dbname=$db_name host=localhost user=$user password=$password";
$dbh=pg_connect($cstring)
or die("Could not connect to postgresql database $db_name");

Any clues?

Thanks,
Bob
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >