Hi all,
I'm an absolute beginner in PHP world. I'm trying to connect to PostgreSQL 7.4.6 on a Fedora 2 box in my LAN through PHP 4.3.10 installed via RPM. The script I'm using runs OK until this line:
The values for the vars are:
I don't see anything after the connection line, it seems that the remaining code is not executed. I KNOW that PostgreSQL is working because I can connect OK from a Windows box through pgAdmin3, and I can select data from tables there.
Ah, phpinfo() shows '--with-pgsql=shared' in the 'Configure command' area, and PostgreSQL is listed among other DB in the "dbx/Supported databases" area.
Any clue?
TIA
TheSofty
I'm an absolute beginner in PHP world. I'm trying to connect to PostgreSQL 7.4.6 on a Fedora 2 box in my LAN through PHP 4.3.10 installed via RPM. The script I'm using runs OK until this line:
Code:
if (!$connect=pg_connect("host=$host port=$port user=$user password=$password dbname=$dbname"))
{
echo "Couldn't connect!!\n";
}
The values for the vars are:
Code:
$host = "192.168.1.2"; (I tried "localhost", too)
$port = 5432;
$user = "postgres";
$password = "postgres";
$dbname = "tempoweb";
I don't see anything after the connection line, it seems that the remaining code is not executed. I KNOW that PostgreSQL is working because I can connect OK from a Windows box through pgAdmin3, and I can select data from tables there.
Ah, phpinfo() shows '--with-pgsql=shared' in the 'Configure command' area, and PostgreSQL is listed among other DB in the "dbx/Supported databases" area.
Any clue?
TIA
TheSofty