Re: Can't Get PHP Going on PostgreSQL

From: Thom Dyson <TDyson(at)sybex(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Can't Get PHP Going on PostgreSQL
Date: 2005-03-10 21:17:01
Message-ID: OF7129B5CC.B623FAB2-ON88256FC0.00748802-88256FC0.0074E9F5@sybex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Your php install doesn't know about (or can't find) the postgresql
extension. Default installs don't usually include postgresql support I
think.

run this command

ldd /usr/local/apache/libexec/libphp4.so

where the second parameter is the location of your php module for apache.

This will list the shared object files that php needs. If you don't see a
line like this

libpq.so.3 => /usr/lib/libpq.so.3 (0x4001b000)

then php was not compiled to include postgresql.

Thom Dyson
Director of Information Services
Sybex, Inc.

pgsql-php-owner(at)postgresql(dot)org wrote on 03/10/2005 01:08:47 PM:

> I am new to both PHP and PostgreSQL. Trying to install PHP and
> PostgreSQL 8.0 on Slackware Linux 10.0.0 .
> I am getting the following error out of Apache:
> "Fatal Error: Call to undefined function: pg_connect() ...."

> PostgreSQL is up and running, and appears to be fine.

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Gavin M. Roy 2005-03-10 21:29:43 Re: Can't Get PHP Going on PostgreSQL
Previous Message Van Ingen, Lane 2005-03-10 21:08:47 Can't Get PHP Going on PostgreSQL