Postgres from PHP in Leopard

From: Gordon <gordon(dot)mcvey(at)ntlworld(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Postgres from PHP in Leopard
Date: 2007-12-19 11:32:03
Message-ID: 496ea2b7-e393-4bdd-a6be-0916c7e0a3ef@q77g2000hsh.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm a web developer who does a lot of work in PHP. The back end
database we use is bases on Postgres. I am trying to set my new
MacBook Pro up as a development system.

I have managed to install Postgres from http://sourceforge.net/projects/pgsqlformac/
and can access the database on my mac with tools such as pgAdmin. I
have also enabled the bundled Apache and PHP extensions.

However, the problem is that I can't get PHP to talk to Postgres.
Running phpinfo () on the built in PHP shows that database support
extends as MySql, Mysqli and SQLite extensions, and SQLite drivers for
PDO. What I really need is a Postgres extension for maintaining older
code and a Postgres PDO driver for new code in development.

When setting up a similar dev system on Windows it was relatively
simple to set this all up. The extensions for PHP were provided
in .dll files that you just had to include in the php.ini file. This
doesn't seem to be the case with the MacOS bundled PHP.

Is it possible to download .so files (I believe that's what the MacOS
equivalent to .dll files are) for the drivers and include them from
the php.ini file like on the Windows box? Or is there something else
I'm meant to be doing?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoff Ellingwood 2007-12-19 12:57:43 Trouble running PostgreSQL server / Server must be started under certain locale.
Previous Message Andrew Nesheret 2007-12-19 10:21:57 Re: foreign key constraint, planner ignore index.