Getting PHP + GD + pdo_mysql working on OSX 10.5 (aka recompiling everything)

This guide walks through the steps necessary to setup PHP on Leopard in order to run the HEAD version of Drupal. The basic steps are installing several prerequisites then recompiling Apache and PHP from source. It could totally bork your system, I'm just writing it down so the next time I need to do this I can remember what I did. I wish I could give credit to all the places I stole bits from but I didn't do a good job of keeping notes early on.

Every time Apple releases a security update it seems to end up overwriting PHP or Apache and I end up revisiting these instructions. Since it's my personal guide I'm continually modifying it to match my current needs. For example, the last big change was adding in old mysql extension and the new PDO-mysql extension. The upside for you, kind reader, is that this keeps the instructions up-to-date. The down side is that when you come back in two months and try to repeat one part of this it may not work because I've changed some of the earlier steps.

Last Updated: August 26, 2009

First, a couple of notes on the formatting of this guide. The blocks of shell command typically include the shell prompt (sh-3.2#) when you're copying-and-pasting the command make sure you don't grab that part. Since this is long enough I've omitted large blocks of the compiler output and used [...] to indicated the omission.

Switch to the root account

To follow these instructions you need to be running as the root user using the default sh shell. If you've got the correct administrator permissions you can switch users using the sudo command and providing your password.

amorton@minivac:~% sudo su
Password:
sh-3.2#

Install MacPorts

Follow the directions to install Mac Ports.

Then use port to grab a copy of wget and the GD dependency, jpeg, as well as freetype and t1lib for rendering fonts. You'll probably be in for a half our wait while a bunch of dependencies installed if this is the first time you've installed anything with port:

sh-3.2# /opt/local/bin/port install wget +ssl freetype t1lib jpeg
--->  Fetching expat
--->  Attempting to fetch expat-2.0.1.tar.gz from http://downloads.sourceforge.net/expat

[...]

--->  Fetching jpeg
--->  Verifying checksum(s) for jpeg
--->  Extracting jpeg

--->  Applying patches to jpeg
--->  Configuring jpeg
--->  Building jpeg with target all
--->  Staging jpeg into destroot
--->  Installing jpeg 6b_2
--->  Activating jpeg 6b_2
--->  Cleaning jpeg

Recompile Apache

Rather than just installing Apache from MacPorts I want to rebuild in the native OS X locations so I can use the built-in support. I tried to skip over this step but after wasting a bunch of time finally realized it was important. Grab the latest version of Apache 2.2:

sh-3.2# cd /tmp

sh-3.2# wget http://www.ibiblio.org/pub/mirrors/apache/httpd/httpd-2.2.13.tar.bz2
--2009-08-26 23:44:12--  http://www.ibiblio.org/pub/mirrors/apache/httpd/httpd-2.2.13.tar.bz2
Resolving www.ibiblio.org... 152.46.7.80
Connecting to www.ibiblio.org|152.46.7.80|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://mirrors.ibiblio.org/pub/mirrors/apache/httpd/httpd-2.2.13.tar.bz2 [following]
--2009-08-26 23:44:12--  http://mirrors.ibiblio.org/pub/mirrors/apache/httpd/httpd-2.2.13.tar.bz2
Resolving mirrors.ibiblio.org... 152.46.7.65
Connecting to mirrors.ibiblio.org|152.46.7.65|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5300199 (5.1M) [application/x-bzip2]
Saving to: `httpd-2.2.13.tar.bz2'

100%[======================================>] 5,300,199    301K/s   in 19s    

2009-08-26 23:44:31 (276 KB/s) - `httpd-2.2.13.tar.bz2' saved [5300199/5300199]

Extract it:

sh-3.2# bunzip2 httpd-2.2.13.tar.bz2

sh-3.2# tar xf httpd-2.2.13.tar

Compile it:

sh-3.2# cd httpd-2.2.13

sh-3.2# ./configure --enable-layout=Darwin --enable-mods-shared=all

[...]

sh-3.2# make install

Install MySQL

You only need to follow this step once. If you're re-installing PHP due to an OS X update you safely skip down to the Recompile PHP section.

Use port to install MySQL:

sh-3.2# port install mysql5 +server
--->  Fetching mysql5
--->  Verifying checksum(s) for mysql5
--->  Extracting mysql5
--->  Configuring mysql5
--->  Building mysql5 with target all
--->  Staging mysql5 into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting mysql5 with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
###########################################################
--->  Installing mysql5 5.0.51_0+server
******************************************************
* In order to setup the database, you might want to run
* sudo -u mysql mysql_install_db5
* if this is a new install
******************************************************
--->  Activating mysql5 5.0.51_0+server
--->  Cleaning mysql5

You'll need to create the databases:

sh-3.2# /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
Installing MySQL system tables...
080618  0:14:33 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive
OK
Filling help tables...
080618  0:14:34 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/db/mysql5/ is case insensitive
OK

[...]

Let launchd know it should start MySQL at startup.

sh-3.2# launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Create a symlink for the mysql5 executable so it can be invoked as mysql (the way that the mysql_secure_installation script expects it to be named):

sh-3.2# ln -s /opt/local/bin/mysql5 /opt/local/bin/mysql

Secure the server and set a new admin password:

sh-3.2# /opt/local/lib/mysql5/bin/mysql_secure_installation

Create a configuration file:

sh-3.2# cp /opt/local/share/mysql5/mysql/my-large.cnf /etc/my.cnf

Finally create some symlinks so that PHP can find the insanely installed MySQL headers and libraries:

sh-3.2# ln -s /opt/local/lib/mysql5/mysql /opt/local/lib/mysql

sh-3.2# ln -s /opt/local/include/mysql5/mysql /opt/local/include/mysql

Recompile PHP

Download the latest PHP source:

sh-3.2# cd /tmp

sh-3.2# wget http://us3.php.net/get/php-5.2.10.tar.bz2/from/this/mirror
--2009-08-26 12:17:55--  http://us3.php.net/get/php-5.2.10.tar.bz2/from/this/mirror
Resolving us3.php.net... 209.41.74.194
Connecting to us3.php.net|209.41.74.194|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://us3.php.net/distributions/php-5.2.10.tar.bz2 [following]
--2009-08-26 12:17:56--  http://us3.php.net/distributions/php-5.2.10.tar.bz2
Connecting to us3.php.net|209.41.74.194|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8808759 (8.4M) [application/octet-stream]
Saving to: `php-5.2.10.tar.bz2'

100%[======================================>] 8,808,759   54.4K/s   in 1m 56s 

2009-08-26 12:19:54 (74.0 KB/s) - `php-5.2.10.tar.bz2' saved [8808759/8808759]

Extract it:

sh-3.2# bunzip2 php-5.2.10.tar.bz2

sh-3.2# tar xf php-5.2.10.tar

Compile it:

sh-3.2# cd php-5.2.10

sh-3.2# MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load"

sh-3.2# ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-config-file-path=/private/etc --sysconfdir=/private/etc --enable-cli --with-curl=/opt/local --enable-ftp --enable-mbstring --enable-mbregex --enable-sockets --with-ldap=/usr --with-ldap-sasl --with-kerberos=/usr --with-mime-magic=/etc/apache2/magic --with-zlib-dir=/usr --with-xmlrpc --with-xsl=/usr --without-iconv \
--with-gd --with-png-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-jpeg-dir=/opt/local --enable-exif \
--with-freetype-dir=/opt/local --with-t1lib=/opt/local \
--enable-pdo --with-mysqli=/opt/local/bin/mysql_config5 --with-pdo-mysql=/opt/local/bin/mysql_config5 --with-mysql=/opt/local --with-mysql-sock=/opt/local/var/run/mysql5/mysqld.sock

[...]

Thank you for using PHP.

sh-3.2# make install

Test that PHP has the GD and MySQL modules installed:

sh-3.2#  php -m |grep "gd\|mysql"
gd
mysql
mysqli
pdo_mysql

If you don't already have a php.ini file you'll need to create one by copying the default:

sh-3.2# if ( ! test -e /private/etc/php.ini ) ; then cp /private/etc/php.ini.default /private/etc/php.ini; fi

Restart Apache:

sh-3.2# apachectl restart

Clean up

Once you've got everything working correctly you can remove the source code:

sh-3.2# rm -r /tmp/php-5.2.* /tmp/httpd-2.2.*

This it actually pretty optional, when you reboot OS X cleans out the temp directory.

update

thanks for your precious guide

The +server variant is obsolete. Please install the mysql5-server port instead.

Why not configure PHP for both pgsql and mysql?

Once upon a time, I, too, cared about pgsql support in Drupal. ;) That lead me to write the following in the d.o handbooks:

HowTo: Installing PostgreSQL and MySQL on the same Mac OS X machine

The basic premise is:
1) Download, configure, build, install mysql
2) Download, configure, build, install pgsql
3) Download PHP, configure it with the necessary args to support both DBs, build install

Since you've got both sets of instructions here, it seems like it'd be easy to merge them, and advocate that when you're ready to configure PHP, you should really run:

MACOSX_DEPLOYMENT_TARGET=10.5;
./configure --prefix=/usr/local \
--with-apxs2=/usr/sbin/apxs --with-config-file-path=/private/etc \
--sysconfdir=/private/etc --enable-cli --with-curl=/usr --enable-ftp \
--enable-mbstring --enable-mbregex --enable-sockets --with-ldap=/usr \
--with-ldap-sasl --with-kerberos=/usr \
--with-mime-magic=/etc/apache2/magic --with-zlib-dir=/usr \
--with-xmlrpc --with-xsl=/usr --without-iconv --enable-bcmath \
--with-gd \
--with-png-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 \
--with-jpeg-dir=/opt/local --enable-exif \
--with-freetype-dir=/opt/local --with-t1lib=/opt/local \
--enable-pdo \
--with-pgsql=/opt/local/lib/postgresql83 \
--with-pdo-pgsql=/opt/local/lib/postgresql83 \
--with-mysqli=/opt/local/bin/mysql_config5 \
--with-pdo-mysql=/opt/local/bin/mysql_config5 \
--with-mysql=/opt/local \
--with-mysql-sock=/opt/local/var/run/mysql5/mysqld.sock

Then, your one install of PHP can talk to either DB, which makes it a lot easier to test compatibility issues... That's what I've got running now on my box, and so far everything is working great. Might be nice to add a section to both documents pointing this out.

Thanks again for a great resource,
-Derek (dww)

Why not configure with --prefix=/usr/local or /opt/local?

p.s. Note that my --prefix for configuring PHP is /usr/local (could be /opt/local, too, if you like). Seems like trying to hijack Apple's copy in /usr is doomed to failure, as you point out that you have to keep re-doing this each time there's a software update. Why not just keep your own locally installed version of PHP elsewhere? Seems like that's also safer in terms of the potential to "totally break your system" when following these instructions. ;) And, then you can always have both copies to do sanity checks against if you really need to compare something...

Cheers,
-Derek (dww)

I ended up just using

I ended up just using --without-ldap, and was able to configure PHP and build it.

( online phd degree , online doctoral degree and Online universities )

--enable-bcmath required for OpenID

This is a great resource, thanks Drewish! I've finally got a working stack for running (and testing) D7 HEAD now. Yay. ;)

One snag I hit was that after everything was working, I ran the full test suite locally and it crashed in the OpenID tests with an undefined call to bccomp(). I tracked this down to the fact that when I ran ./configure for PHP, I didn't pass in --enable-bcmath. Once I re-ran configure with that added, recompiled, installed, and restarted apache, all the OpenID tests pass cleanly. So please update your instructions (both here and the ones for pgsql) to include that, so everyone gets a fully functional PHP that can test OpenID.

Thanks again!
-Derek (dww)

Howto build with iconv

Could You please add instructions on how to build php with iconv?

I tried to configure:
--with-iconv
--with-iconv=/opt/local
--with-iconv=shared,/opt/local

but none of them worked for me,
instead I get this error every time when I try to "make":

Undefined symbols:
  \\"_iconv_close\\", referenced from:
      _php_iconv_string in iconv.o
      __php_iconv_strlen in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      _zif_iconv_substr in iconv.o
      _zif_iconv_substr in iconv.o
      _php_iconv_stream_filter_dtor in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
  \\"_iconv_open\\", referenced from:
      _php_iconv_string in iconv.o
      __php_iconv_strlen in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_mime_decode in iconv.o
      __php_iconv_mime_decode in iconv.o
      _zif_iconv_substr in iconv.o
      _zif_iconv_substr in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _php_iconv_stream_filter_factory_create in iconv.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

iconv from MacPorts?

I'd try installing iconv from MacPorts and then using --with-iconv=/opt/local

Iconv

Has anyone managed to do this?

I read here that ICONV will have to be built manually as the macports version is not 64-bit ready.

http://www.malisphoto.com/tips/php-on-os-x.html#Anchor-Iconv

Would appreciate some advise on this.
Thnx

Thank You for keeping this instructions Up-To-Date

Since every Apple Security Update disables GD I have to visit this page and after a few minutes my working environment is as I want it to be.
Today I've skipped the Mysql-part, just compiling Apache and php (I am happy with my 5.0.67 version of mysql).

Thank You for Your work!

LDAP error when compiling PHP

when I went to configure PHP with the huge ./configure command, I got an error on LDAP:

configure: error: Cannot find ldap libraries in /usr/lib.

I've followed everything to the letter so far. In my /usr/lib directory, I have these two files:

  • libldap.dylib -> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
  • libldap_r.dylib -> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP

so it looks like the LDAP libraries are there. Since I won't be using LDAP on my MBP, can I just leave that option out? Or is there another way to get the config command to see those libraries?

Thanks.

More relevant output lines

Also, two more relevant lines from the configure command output:

checking for LDAP support... yes
checking for LDAP Cyrus SASL support... no

Without LDAp

I ended up just using --without-ldap, and was able to configure PHP and build it.

My php.ini file is in /private/etc instead of /etc. Will that cause a problem?

shouldn't be a problem

I've updated the instructions to reference /private/etc since that's the canonical name but it really shouldn't make a big difference.

Thanks MILLIONS

Mr. Drewish

Just wanted to say thanks, you helped me a lot.

Best Wishes

a complete mess

I have made a complete mess of this. I actually installed macports last night, before reading this article. So, I skipped the part about installing macports, and logged in as "su", then began with this command, which ran without error:
sh-3.2# /opt/local/bin/port install wget +ssl freetype t1lib jpeg

it took about 20 or 30 minutes to download all the dependencies, as you said it would. Then I tried to run the next command:
sh-3.2# wget http://ftp.wayne.edu/apache/httpd/httpd-2.2.11.tar.bz2

I got "wget: command not found". But, I *know* I got wget, because here is the relevant section of my terminal output:
---> Fetching wget
---> Attempting to fetch wget-1.11.4.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/wget
---> Verifying checksum(s) for wget
---> Extracting wget
---> Configuring wget
---> Building wget
---> Staging wget into destroot
---> Installing wget @1.11.4_0
---> Activating wget @1.11.4_0
---> Cleaning wget

so, I figured my PATH variable must not include the path to wget. But, I can't find an executable for wget anywhere on my machine, in order to determine what the path is. I have a difficult time getting meaningful results out of the search functionality in the Finder but, I am pretty sure I did a thorough job. When I performed my search I saw several mentions of "wget" in macport directories. They were nested pretty deeply, and as I thought about it, I thought it might be best to uninstall macports, and start again.
Now I really have a mess. I reinstalled macports but, if I try to start from scratch with your instructions, I get lots of errors because varying files already exist but do not have a registered port assigned to them.
UGH. All I wanted was to get a pdo_mysql driver installed, and it has knocked me out of commission for 3 days now.
Do you have any suggestions as to how I get clear this up?
Any help would really be appreciated. I can't believe it is this difficult to get a driver so I can connect to a database.

Oh, yeah you'd need to set

Oh, yeah you'd need to set the path... it should be in /opt/local/bin/wget and you should be able run it by specifying the full path or you could add it to your path. There are some instructions on the MacPorts site: http://trac.macports.org/wiki/InstallingMacPorts

Worst case I'd say just rm -rf /opt/local and re-install...

I've spent hours before to

I've spent hours before to build an environment with Apache, PHP, Mysql, Mysqli and PEAR - none of them worked.

( Online education and Almeda University )

thanks very much

Thank you for your response, and for this fantastic tutorial. It really is exactly what I needed.

I assume that deleting the 'local' directory will have many unexpected and unpleasant consequences so, I will try to save that as the WORST case, and then make a backup copy of the directory before I squash it (if I do).

Thanks again for this very valuable information.

Hi thanks for sharing your

Hi thanks for sharing your knowledge,
Out of desperation and probably a bit foolhardy of me I decided to delete /opt/local with rm -rf /opt/local (worst case).

Now when I start form scratch I get the following error by step one

/opt/local/bin/port: No such file or directory.

Can you please advise?

Thanks in advance

Obviously I forgot to

Obviously I forgot to reinstall macports.
Thanks again for this great help

xdebug

i needed to install xdebug so
sudo pecl install xdebug
did the heaving lifting and adding:
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
to the php.ini file got it going.

Thank you!

Thank you!!! That article just saved my sanity after trying to figure it out on my own! Btw, I think you need to create the mysql config file before setting up the databases. I had some trouble running mysql_secure_installation and I think it was because the sockets were in the wrong spot without the config change.

Thank You!!!

Thany you very much for this step-by-step instructions.
I only have a very vaque idea of what happened technically - compiling, libraries and that kind of stuff are very strange to me - BUT IT WORKED!

I've spent hours before to build an environment with Apache, PHP, Mysql, Mysqli and PEAR - none of them worked.

Your's did!

Would be great if you continue updating these instructions so I can use them again if a security-update (or whatever) spoils my mac.

Best regards - Harald

Can't find the socket.

I'm doing the installation and everything is going well until
sh-3.2# /opt/local/lib/mysql5/bin/mysql_secure_installation
I get the error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
How can I fix this?

recompile php with orig mysql package

I fixed it the lazy way: uninstalled mysql5 port, and installed the 5.1 osx-dmg package and recompiled php with:

./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --sysconfdir=/private/etc --enable-cli --with-curl=/opt/local --enable-ftp --enable-mbstring --enable-mbregex --enable-sockets --with-ldap=/usr --with-kerberos=/usr --with-mime-magic=/etc/apache2/magic --with-zlib-dir=/usr --with-xmlrpc --with-xsl=/usr --without-iconv --with-gd --with-png-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-jpeg-dir=/opt/local --enable-exif \--with-freetype-dir=/opt/local --with-t1lib=/opt/local \--enable-pdo --with-mysqli=/usr/local/bin/mysql/mysql_config --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql

Workaround for ERROR 2002 (HY000): Can't connect to local MySQL

had the same problem when following the excellent step-by-step-instructions.

reading the output of the installation helped:
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h my-new-imac.local password 'new-password'

# so I did
cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &

# and in an new terminal window:
sh-3.2# /opt/local/lib/mysql5/bin/mysqladmin -u root password 'ENTER_YOUR_PASSWORD_HERE'

/opt/local/lib/mysql5/bin/mysqladmin -u root -p -h localhost status
/opt/local/lib/mysql5/bin/mysqladmin -u root -p -h localhost reload

# and could run the script after that
/opt/local/lib/mysql5/bin/mysql_secure_installation

HTH harald

You are my new hero!

Thanks for sharing your lovely little recipe chief! Much appreciated. I have a hand built install of MySQL which made it a little more tricky but managed to work out what to change in the configure line. Interestingly the Macports version of MySQL seemed to be unavailable on any of the mirrors anyway so it's a good job it works without Macports...

LIFE SAVER!

Thanks for this guide! It makes life a little easier when things are documented this comprehensively.

Brilliant

I really thank you for this tutorial since it has been a nightmare, specially considering I am newby to all this sudo/make/install, etc... I have seen other tutorials, but most of them didn't work.
Now at least I have it running and hopefully I can concentrate in my work.
Mil gracias!!!

thanks

i think it's because it stays up-to-date, every time freaking apple does a new security update i have to re-run them and fix any bugs i come across.

can use mysql binaries? what about os x server?

awesome tutorial drewish!!

I do have a couple of questions, if you don't mind...

1) I was wondering why you didn't use the MySQL binaries available to install on OS X from http://www.mysql.com/ ?
I'm just curious if it was a choice you decided or if it was some kind of limitation / wall that you came across that required using ports to install it.

2) Any idea of a success-rate with doing this on OS X Leopard Server?

3) [last one :) ] I'm also trying to become more savvy with UNIX in general and am wondering if you have any good references for dumbed down info on the who "make", "make install" ,".configure" stuff (in particular with regards to php and libraries, etc). I'm eager to learn how to roll my own version out if I can.

Thanks!!!
-Ernie

1: originally i was using

1: originally i was using the mysql binaries but the problem i ran into was that it wasn't easy to upgrade or uninstall them. with macports it's not a problem.

2: should work, on that though mysql is installed by default so i altered the paths to point to the existing mysql installation.

3: i can't think of any off the top of my head but usually it's just a matter of trying to read through the configure file to see what it's doing and just experimenting with different values to get the results you need.

altered path

Dear Drewish,

Although this is the first tutorial that I found clear on installing GD and others, I would like to know what are exactly the altered paths you talked about above to install on Mac OS X Server because I cannot find paths that work. All the time it says to me that it cannot find the header for Mysql.

If you could give me the paths it would be great.

And I assume in that case you don't install Mysql from MacPorts and if I did so do I have to uninstall it ? Is it easy to uninstall with MacPorts ?

Thanks a lot

apache does not compile

i was on my way to compile apache2 when (surprise!) some compilation errors came, starting form

awk -f /users/michael/temp/httpd-2.2.9/build/make_exports.awk `cat export_files` > exports.c
/opt/local/share/apr-1/build/libtool --silent --mode=compile /usr/bin/gcc-4.0 -DDARWIN

[skipped ...]

/../generators -I/users/michael/temp/httpd-2.2.9/modules/ssl -I/users/michael/temp/httpd-2.2.9/modules/dav/main -prefer-non-pic -static -c exports.c && touch exports.lo
exports.c:1287: error: redefinition of 'ap_hack_apr_allocator_create'
exports.c:152: error: previous definition of 'ap_hack_apr_allocator_create' was here
exports.c:1288: error: redefinition of 'ap_hack_apr_allocator_destroy'

[ a bunch more ...]

not sure

not sure why you'd be running into that. i keep updating these instructions each time i've re-run them on new machines and i've never seen that. please post a follow-up if you figure anything out.

What are the installation paths?

Hi, thanks for this guide. I had installed some of these with XAMPP. The reason I found your guide is that I need to build PHP and Apache with Postgresql support.

My questions:

1. Could you please add some info on (or email me, thanks) with the paths of these things that we have installed?

2. What is the command to build Postgresql into PHP?

Thanks!

write up for postgresql

I ended up writing up a version of this for pgSQL: http://drewish.com/node/128

postgresql

i've never setup pgsql on the mac so i can't offer much guidance other than using port to install it and then adding in some of the pgsql options when compiling php. lullabot seems to have a pretty good write up on it though: http://www.lullabot.com/articles/beginning-drupal-6-and-postgresql-os-x-...

Many thanks

This was invaluable for getting my 10.5 localhost set up for Drupal - many thanks.

They should have taken

They should have taken backup from a third party service , not to loose the market. örgü modelleri 

Finally

Thanks drewish, I was having a hard time to make this work. Your post worked flawlessly.

Daniel.

build --with-mysql

Work great with this guide.. thank you..
I wonder if I want to build php with mysql module not with mysqli,
seem like compile need mysql header files...

I browse all site with no luck searching mysql header for leopard.
Any idea with this problem??

Work great with this guide..

Work great with this guide.. thank you..
I wonder if I want to build php with mysql module not with mysqli,
seem like compile need mysql header files.

Örgü

give it another try

I just updated the instructions to build --with-mysql. Basically you need to install mysql from MacPorts and then add some symlinks so that the configure script can find the lib and includes.

How about instructions to

How about instructions to build --with-mcrypt.

araba oyunlar?

very nice !

thanks for information

greats blogs.

Hey, nice post, really well written. You should post more about

bayrakor any community
bayrak diregior any community of people indispensable.
turk bayragi or any community of people indispensable.
bayrak or any community of people indispensable.
film izle or any community of people indispensable.
porno izle or any community of people indispensable.
porno or any community of people indispensable.
porno izle or any community of people indispensable.
film izle or any community of people indispensable.
porno izle or any community of people indispensable.
sex izle or any community of people indispensable.
sikis or any community of people indispensable.
film izle or any community of people indispensable.
film izle or any community of people indispensable.
sex izle or any community of people indispensable.
film izle or any community of people indispensable.
porno izle or any community of people indispensable.
film izle or any community of people indispensable.
porno izle is a video site.
sex izle or any community of people indispensable.
porno is a video site.
sikis or any community of people indispensable.
sex izle is a video site.

THANKS ADM?N

sikis is a video site.
sex izle or any community of people indispensable.
film izle or any community of people indispensable.
porno or any community of people indispensable.
porno or any community of people indispensable.
sikis or any community of people indispensable.
porno or any community of people indispensable.
porno izle or any community of people indispensable.
porno izle or any community of people indispensable.
sex izle or any community of people indispensable.
porno or any community of people indispensable.
sikis or any community of people indispensable.
porno or any community of people indispensable.sikis or any community of people indispensable.
sex izle or any community of people indispensable.
sikis or any community of people indispensable.