Re: Hi!, and a Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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!



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux