473,473 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Postgres from PHP in Leopard

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?
Dec 19 '07 #1
2 2131
On Dec 19, 11:32 am, Gordon <gordon.mc...@ntlworld.comwrote:
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 fromhttp://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?
Anyone?
Dec 20 '07 #2
In article
<df**********************************@w56g2000hsf. googlegroups.com>,
Gordon <go**********@ntlworld.comwrote:
Anyone?
Well, you'll probably have to recompile PHP to include postgres, no?

I compiled postgresql in Tiger, on a G4, and all the *.so files wound up
in /usr/local/pgsql; then I recompiled PHP and told it where to look
for pgsql, and voila. I'm not sure how the package you have works. I
can't find any dynamic extensions in the stock Leopard PHP setup;
/etc/php.ini points to ./ as the directory they're supposed to be in,
and I'm not even sure what that might mean.
--
W. Oates
Dec 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra...
0
by: NM | last post by:
Hello, I've got a problem inserting binary objects into the postgres database. I have binary objects (e.g. images or smth else) of any size which I want to insert into the database. Funny is it...
1
by: chewie54 | last post by:
Hi All, Does anyone know what version of Python and wxPython comes with the new Mac OS X Leopard? Thanks
2
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
I just installed Leopard on my Mac. I already was using Python 2.5. I can run a Python script from a terminal window by typing "python script.py" as one would expect ... but not using the Python...
4
by: mark | last post by:
I've recently switched from Ubuntu to OS X Leopard. I have some python scripts which download info from the web. The scripts were working fine before on Ubuntu, but urllib seems to work really...
8
by: geert | last post by:
Hi all, I have a mac mini running maocosx 10.5 leopard I want to deploy a django project on. My backend is MySQL, and I have it running as a 64- bit app. Of course, apache2 is also running as...
3
by: Gordon | last post by:
Has anybody had any success compiling a PHP build for Leopard, specifically for Leopard running on a 64 bit Intel architecture? I have been using the Entropy builds up to now but there has been a...
1
by: blackbiscuit | last post by:
Hi, I wanna have boost installed on my mac leopard system. I have searched through google and it seems the boost can not been directly installed but through tools like macports. Since it is...
6
by: Massi | last post by:
Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I found at this link:...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.