Having a pretty rough time getting php5 installed

Rainer Müller raimue at macports.org
Sat Aug 9 08:24:42 PDT 2008

Scott Haneda wrote:
> Maybe I'm not understanding this entirely. I already have mysql 5  
> installed from source and running. I also have apache 2 running as  
> part if the built in os install.
 > I don't need to have those installed. They are running and configured
 > as I need them to be.

First of all, MacPorts never depends on external installs of software.
See our FAQ for this:

It is not so easy to compile modules for the builtin apache2 in Leopard, 
because you would need to generate a 4-way universal binary. Otherwise 
apache2 from Leopard can't load it. I consider universal building in 
MacPorts as experimental as it does not work for every port. Also, with 
1.6.0 it is only possible to build 2-way universal binaries, 4-way is 
only possible with trunk.

I would recommend to use everything from MacPorts. We have a HOWTO for 
setting up Apache, MySQL and PHP:

> I thought the +mysql5 meant php would gain support for mysql5. Same  
> with the other +options.
> So if I only want php5 with certain built in features like works with  
> apache 2 and mysql5 and sqllite etc. How do I do that?

Yes, that's what variants are for.

See 'port variants php5' to see what else you can select.

> Then once I have the php working as I need it how do I pull those  
> chunks to my live server?

Unfortunately, that's not so easy. If the system is exactly the same 
hardware, you can generate either packages by 'port pkg' (and also disk 
images with 'port dmg') or enable archive mode.

But the files will always end up at the same prefix (/opt/local by 
default, can only be changed by installing from source).

Archive mode is complicated, as it needs modification at the source and 
at the target machine before you start building. There are a few 
pointers in the guide, although it's hard to understand if you are 
unexperienced with MacPorts.

I don't use such a setup, so I would leave it to others to comment on 
these a bit more.

> Maybe you can also explain a little about your colo test and migration  
> system.
> I have little trouble installing mysql and a few others from source.  
> Php5 on the other hand, in order to give it at least a little support  
> for things like gd and the rest there are too many other little things  
> to compile alongside,each needing other compiles as well. Trying to  
> avoid that headache.

Each software has it set of dependencies. You also need to build those 
to make the software work. Sorry, that's the way it is.


More information about the macports-users mailing list