From: Frank Bax <fbax@sympatico.ca>
To: pgsql-php@postgresql.org
Subject: Re: Hi!, and a Question
Date: Tue, 08 Jun 2004 08:20:35 -0400
Message-ID: <5.2.1.1.0.20040608081521.033bd310@pop6.sympatico.ca> (raw)
In-Reply-To: <20040608061707.99638.qmail@web50106.mail.yahoo.com>
References: <OF8B055BC3.23CD56A0-ON85256EA9.00469000-85256EA9.00470E80@statestr.com>
Check your apache log to see if error messages are being logged there.
I'll make a guess anyway. With a connect statement like:
$db = pg_connect("dbname=cdtaller4_3");
You should also have user=xxxxx inside the quotes.
You may or may not have more success by adding host=localhost.
Frank
At 02:17 AM 6/8/04, David Cruz wrote:
>Hi!, about this, I'm using it local, in the same
>server is postgresql and the database and the apache
>web server too. I have downloaded the php-pgsql again
>and install it again, it was an rpm and i have knoppix
>(debian), so I did it with #alien -i, I have this in
>my php.ini
>
>------
>;;;;;;;;;;;;;;;;;;;;;;
>; Dynamic Extensions ;
>;;;;;;;;;;;;;;;;;;;;;;
>;
>; If you wish to have an extension loaded
>automatically, use the following
>; syntax:
>;
>; extension=modulename.extension
>;
>; For example, on Windows:
>;
>; extension=msql.dll
>;
>; ... or under UNIX:
>;
>; extension=msql.so
>;
>; Note that it should be the name of the module only;
>no directory information
>; needs to go here. Specify the location of the
>extension with the
>; extension_dir directive above.
>extension=pgsql.so
>
>------
>
>I have pgsql.so in /usr/lib/php4/20020429 which is the
>place where phpinfo(); says it's searching for
>extensions
>
>
>-------
>and my /etc/postgresql/pg_hba.conf says:
>
>#
># TYPE DATABASE USER IP-ADDRESS
>IP-MASK METHOD
># Database administrative login by UNIX sockets
>local all all
> trust
>#
># All other connections by UNIX sockets
>local all all
> trust
>#
># All IPv4 connections from localhost
>host all all 127.0.0.1
>255.255.255.0 trust
>#
># All IPv6 localhost connections
>host all all ::1
>ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
>host all all ::ffff:127.0.0.1/128
> trust
>#
># reject all other connection attempts
>localhost all all 192.168.1.6
> 255.255.255.0 trust
>
>-------
>and the phpinfo page shows:
>
>pgsql
>PostgreSQL Support enabled
>Active Persistent Links 0
>Active Links 0
>
>Directive Local Value Master Value
>pgsql.allow_persistent On On
>pgsql.auto_reset_persistent Off Off
>pgsql.max_links Unlimited Unlimited
>pgsql.max_persistent Unlimited Unlimited
>
>-----
>I don't know what am I doing but it doesn't work, when
>I execute the php web page:
>
><?php $db = pg_connect("dbname=cdtaller4_3"); $query = "select * from
>empleados"; $result = pg_exec($db, $query); if (!$result) { printf
>("ERROR"); $errormessage = pg_errormessage($db); echo $errormessage; exit;
>} ?> <index3.htm>a index3
>It doesn't shows any error or something it stays on
>the same page it was, and do nothing...
>
>Thanks...if somebody knows another configuration I'm
>forgetting.. (PHP 4, Apache, PostgreSQL 7.4.2, Knoppix
>3.4)
>
>thanks!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: fbax@sympatico.ca
Subject: Re: Hi!, and a Question
In-Reply-To: <5.2.1.1.0.20040608081521.033bd310@pop6.sympatico.ca>
References: <OF8B055BC3.23CD56A0-ON85256EA9.00469000-85256EA9.00470E80@statestr.com> <5.2.1.1.0.20040608081521.033bd310@pop6.sympatico.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox