Help Conecting to a database from PHP

From: "David Cruz Ramos" <dcruz(at)redcolombia(dot)com(dot)co>
To: <pgsql-php(at)postgresql(dot)org>
Subject: Help Conecting to a database from PHP
Date: 2003-12-01 15:41:37
Message-ID: 3219C8BE8C5DCB4E95503D8E6B0BE901682512@sred01exs.redcolombia.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi All!

My PC has Slackware Linux 9.1 installed.

And Apache and PHP are working well....I can make and use the PHP functions in my web pages. Recently I've downloaded and installed PostgreSQL 7.3.2, it seems to work well too, I can make databases, tables and all...But when I try to use the PHP functions to connect to the database (pg_connect or pg_pconnect) it doesn't work. I've granted select permission to my user and nobody user in the table of the databse, and my pg_hba.conf seems to be ok ( localhost all all trust ).
The browser even not give any error or something....it just don't work...

I think I'm using the function in the correct way: $conn = pg_connect ("localhost","","","","mydbname");

I've tried too: $conn = pg_connect ("dbname=mydbname");

with and without the port number (5432), and when I type: netstat -nat it shows:

0.0.0.0:5432 LISTEN

in the list

I'm starting the database server in this way: /usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data

thanks....

does somebody know what can I do?

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Mariusz Pekala 2003-12-01 16:53:43 Re: Help Conecting to a database from PHP
Previous Message Majolee InfoTech 2003-11-28 08:22:09 plan CONTEXT: PL/pgSQL function Error