Mailinglist Archive: opensuse (3618 mails)

< Previous Next >
Re: [opensuse] php and postgres 9.3 vs 10.3
  • From: Robert Paulsen <robert@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 26 Jan 2009 13:33:52 -0600
  • Message-id: <200901261333.52346.robert@xxxxxxxxxxxxxxxxx>
On Monday 26 January 2009 1:00 pm, Cristian Rodríguez wrote:
Robert Paulsen escribió:
The php code that is failing is:

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

Any clues?

Did you enabled error reporting ? set display_errors=On in php.ini

ps: that piece of code, does not make sense...first $dbh is assigned to
be a reference of $_SESSION['dbh'] (which is a real hack, what you want
seems to be the "singleton pattern" instead) but a line later it is
reasigned by value to be a postgresql resource.. no wonder if there is
other bug around...

Thanks -- got some clues to track down using display_error=On. Seems my php
code (written for php v4) does not please php5. This is old code from one of
my first php projects. Looks like it will need some cleanup.

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

< Previous Next >