note 82349 deleted from install.macosx.client by danbrown
| From: | danbrown@php.net | Date: | Fri, 28 Jan 2011 14:31:54 +0000 |
| Subject: | note 82349 deleted from install.macosx.client by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176434@lists.php.net to get a copy of this message | ||
Note Submitter: mdoyle at cooperationireland dot org
----
With OSX 10.5, the bundled version is up to date but didn't come with the modules I needed
(notably I wanted the pgsql database extension).
Getting this to work was quite simple in the end, what made it difficult is the build-options for
Apache. After searching on google, I found instructions to re-build apache with the following
options:
./configure --enable-layout=Darwin --enable-mods-shared=all
(Step 1: download the latest Apache2.2 source files,
Step 2: extract the tarball
Step 3: ./configure --enable-layout=Darwin --enable-mods-shared=all
Step 4: make all
Step 5: sudo make install)
Without this step, when I rebuilt PHP either directly with the source from the PHP.net site or using
MacPorts I was getting an error about the wrong architecture like this one:
httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf: Cannot load
/usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): no
suitable image found. Did find:\n\t/usr/libexec/apache2/libphp5.so: mach-o, but wrong architecture
After re-building and Apache with the configuration above and restarting it, everything worked
again and I can now use PostgreSQL from within PHP on my MacBook Pro.