Issue installing PHP on Mac OS X (but more of a Unix issue I think)

jbubrisk

Senior member
Oct 6, 2005
506
0
71
Hey friends.

Background (Don't read this if you don't want to):
So I've been fighting with getting AMP on my Mac for a few days now. The default install of the OS comes with Apache 2.2.9 and PHP 5.2.6, but no MySQL... To make matters worse, I've heard that PHP is installed in a funky way, so I couldn't get the GD library installed as a shared library (I tried). So I decided to try compiling Apache 2.2.11...

./configure --enable-layout=Darwin --enable-mods-shared=all
sudo make
sudo make install
sudo apachectl restart

It worked great. Then I turned to PHP. I tried compiling, but I had some issues with the options I wanted so I removed them all except for 2, just to see if I could get it working at all...

'./configure' '--disable-cgi' '--with-apxs2'
sudo make
sudo make install
sudo apachectl restart

php_info() shows the updated 5.2.8 version of PHP. However I still need the GD library installed and working. So I tried recompiling PHP with the options I think I needed...

'./configure' '--disable-cgi' '--with-apxs2' '--with-config-file-path=/etc/' '--enable-bcmath' '--enable-calendar' '--enable-discard-path' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--with-gd' '--with-kerberos' '--with-mime-magic' '--with-sqlite=shared' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr/X11R6' '--with-zlib'

sudo make
sudo make clean
sudo make install
sudo apachectl restart

But php_info() doesn't show the updated configuration. It still shows the configuration as the 2 option one I first built.
So my question is... WHY!?!?!? Shouldn't "sudo make install" overwrite everything that was previously compiled/installed?


Help! I'd like to finally get back to developing, and not getting my ass kicked by the OS. Thanks in advance!
 

jbubrisk

Senior member
Oct 6, 2005
506
0
71
Oh one more thing... most of those ./configure options came from my webserver php configuration. I figured I would just take them from there, since GD works great there.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Shouldn't "sudo make install" overwrite everything that was previously compiled/installed?

Maybe, maybe not. There's a lot of variables involved. Is there a way to remove Apache and PHP so that you're sure you're running the version you've compiled?

This is one reason why Linux with a package manager is much, much nice than OS X. =)
 

jbubrisk

Senior member
Oct 6, 2005
506
0
71
Well that is what I'm asking... I was able to compile it the first time. That is whats running right now. But when I compile/install again, it doesn't overwrite the current one. Any ideas how to overwrite the current installation of PHP?