Leopard PHP / Apache Package with pecl support
After some hours of blood and sweat I finally managed to get a nicely working Apache / PHP Setup (YES! With a working version of pecl).
I usually us the great! package from Marc which does unfortunately not work nicely on Leopard yet (I hope it's not too much stress for him :) ).
If you'd like to install it try like that:
Unpack to /usr/local like this
Then you need to make some changes in /etc/apache2/httpd.conf
Now you just need to start your brand new apache / php setup like the following:
If you want to build your own setup here is what I did:
I usually us the great! package from Marc which does unfortunately not work nicely on Leopard yet (I hope it's not too much stress for him :) ).
Until he is done (and I switch back) I can provide this package which is very dirty and untested (works for me).
If you'd like to install it try like that:
Unpack to /usr/local like this
cd /usr/local
tar xjvf <the package>
Then you need to make some changes in /etc/apache2/httpd.conf
Change the following line:
ServerRoot "/usr"
To this:
ServerRoot "/usr/local/httpd"
COMMENT (type a # on the beginning of the line) the following lines:
LoadModule cache_module libexec/apache2/mod_cache.so
LoadModule disk_cache_module libexec/apache2/mod_disk_cache.so
LoadModule mem_cache_module libexec/apache2/mod_mem_cache.so
LoadModule proxy_module libexec/apache2/mod_proxy.so
LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so
LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so
LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so
LoadModule ssl_module libexec/apache2/mod_ssl.so
LoadModule bonjour_module libexec/apache2/mod_bonjour.so
Finally UNCOMMENT (remove the #) this line:
#LoadModule php5_module libexec/apache2/libphp5.so
Now you just need to start your brand new apache / php setup like the following:
sudo /usr/local/httpd/sbin/apachectl start
If you want to build your own setup here is what I did:
Compile mhash with this configure:
CFLAGS="-arch i386" ./configure --prefix=/usr/local/httpd
Compile apache like that:
CFLAGS="-arch i386" ./configure --enable-layout=Darwin --enable-mods-shared=all --prefix=/usr/local/httpd
Compile PHP (mainly with what you want but I did like this):
CFLAGS='-arch i386' ./configure \
'--with-zlib' \
'--with-apxs2=/usr/local/httpd/sbin/apxs' \
'--prefix=/usr/local/httpd' \
'--with-iconv' \
'--with-xsl' \
'--disable-xmlreader' \
'--with-jpeg-dir' \
'--with-png-dir=' \
'--enable-bcmath' \
'--with-curl' \
'--with-ldap' \
'--enable-mbstring' \
'--enable-soap' \
'--with-mhash=/usr/local/httpd'
Comments
Just tried libmcrypt which works withouts problem.
Compiled libmcrypt like that:
CFLAGS='-arch i386' ./configure --prefix=/usr/local/httpd
Then specified --with-mcrypt=/usr/local/httpd in the PHP configure statement
imap works too after installing c-client (see http://php.net/manual/en/ref.imap.php) and specifying --with-kerberos and --with-imap=/whereyoucopied
Hi,
Do you know of a simple way to add mcrypt support to the default LAMP setup in Leopard. I just need that one feature enabled. If so, can you tell me the exact commands to run as I am a newbie with Apache installs.
Thanks so much for your help.
Just enabling mcrypt isn't possible. You would have to compile your own version of PHP which can be very tough on Leopard.
Probably the beta package from entropy.ch (can be found in the forums) is an option for you.
No new comments allowed (anymore) on this post.