Questions on compiling homebrew php with postgres support on Mavericks

1

I recently upgraded to Mavericks on my MacBook Pro and a few things broke in the process. One of these was the ability to load a drupal page that sits on a postgres database. I get this message on a white screen:

Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

I installed postgres 9 through Homebrew so I figured I would install and compile php through Homebrew. When I try it, I get another error:

$ brew install php55 --with-apache --with-mysql --with-pgsql
==> Downloading http://www.php.net/get/php-5.5.15.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-5.5.15
Error: No such file or directory - pg_config

In a couple of places, it is noted that in order to get past the pg_config error, postgresql needs to be installed through Homebrew (as opposed to the postgresql9 that I currently have installed). I have the following questions about how to make all this work:

  1. When I install postgresql through homebrew, psql is now pointed to that new installation, even though I want to use the old one. Do I just need to compile php and then manage my PATH and/or set symlinks so that postgresql9 is the default?
  2. If I install postgresql, compile php, and then delete postgresql (but keep postgresql9), I'm assuming there would be problems? Is that the case?
  3. What is the best way to keep my existing postgresql9 database installation and compile php so that it works with postgresql9? Is it to do what I mentioned in 1. or 2. above? Is it to ditch Homebrew PHP and compile it separately? Some other solution? I would prefer a Homebrew solution but would do whatever is recommended/works.

Any help would be appreciated, thanks!

Sanjuro

Posted 2014-07-31T01:05:48.780

Reputation: 11

No answers