Re: PostgreSQL access not working in PHP.

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

 



On Wed, 2005-03-23 at 11:12 +1100, Neil Dugan wrote:
> I am trying to use PostgreSQL in php under Fedora 3.
> 
> I am using the standard RPM (retrieved by up2date).
> PHP 4.3.10 (cgi) (built: Dec 21 2004 09:18:25)
> 
> The php function 
> function_exists('pg_connect')
> always returns FALSE
> 
> 
> The script below
> ----------------
> #! /usr/bin/php
> <?php
> $dbconn = pg_connect ("dbname=mydb");
> if (!$dbconn) {
> 	echo "Failed to connect!\n";
> 	exit;
> }
> ?>
> ----------------
> Gives the output of
> ----------------
> PHP Fatal error:  Call to undefined function:  pg_connect()
> in /tmp/test.php on line 3
> Content-type: text/html
> X-Powered-By: PHP/4.3.10
> ----------------
> 
> 
> phpinfo() says that the 'configure command'
> includes '--with-pgsql=shared'
----
just for fun...

did you install php-pgsql ? 'rpm -q php-pgsql'

you give no 'connect' details...

sockets ? TCP/IP ?

did you edit /var/lib/pgsql/data/pg_hba.conf for your connection type?

Craig


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux