MySQL5 and php5

Ryan Schmidt ryandesign at macports.org
Sat Aug 29 02:38:52 PDT 2009


On Aug 28, 2009, at 19:58, Mark Hattam wrote:

> As I've just port sync'd and received
>
> The following installed ports are outdated:
> mysql5                         5.0.84_0 < 5.0.85_0
> mysql5-server                  5.0.84_0 < 5.0.85_0
> php5                           5.3.0_1 < 5.3.0_2
>
> It seems a good opportunity to sort out my MySQL5 and php5  
> installations, as they're the "old" standard, rather than the  
> prolilfic number of new sub-ports.

> The following ports are currently installed:

> php5 @5.3.0_1+apache2+macosx+mysql5 (active)


Nothing has changed about the mysql5 ports recently.

The php5 port is being split into separate ports for each module; this  
process is mostly complete. The MySQL support in particular is among  
the features that has been split out into its own port in 5.3.0_2.


> But what do I have to uninstall in what order, and will I be able to  
> rebuild everything again ... ?

You don't have to uninstall anything. Simply

sudo port upgrade mysql5 mysql5-server php5

as always.


> Is there a standard crib sheet of which php5 subports used to get  
> installed as "standard" and which of these I now have to install  
> separately?

No, I have not written one. The changelog for the php5 port or my  
notes in ticket #19091 should tell you though. I was thinking it might  
be a good idea to make a "php" page in the wiki, but I haven't started  
work on it. While I'm working on the ports, if someone else would like  
to write documentation, be my guest. There is also already the "MAMP"  
page in the wiki which may need to be updated for the changes in php5  
5.3.0_2.


> So far I've only run foul of gd and mcrypt as you can see above.

Those were some of the first to be pulled out of php5 in 5.3.0_1.  
Several more have been removed in 5.3.0_2.


> does php5 need +mysql5 or +mysql5-server or php5-mysql +mysql5  
> or ... ?
> sudo port install php5 +mysql5
> sudo port install php5 +mysql5-server
> sudo port install php5-mysql +mysql5

If you want a MySQL client program, you install the port mysql5, and  
if you want a MySQL server, you install the port mysql5-server, as  
before.

"port variants php5" informs you what variants are available in that  
port.

Previously, if you wanted MySQL support in PHP, you would select the  
+mysqlnd or +mysql5 or +mysql4 variant of the php5 port. If you do  
this now, or upgrade a php5 that already has these variants selected,  
a message will be printed explaining these variants are obsolete, and  
that you should now install the php5-mysql port instead to get the  
same functionality. (The wording of that message wasn't entirely clear  
so I just changed it.) The php5-mysql port has the same +mysqlnd,  
+mysql5 and +mysql4 variants you can select if desired. The default is  
+mysqlnd which does not require any MySQL libraries.


> oh and apache2 is still 2.2.11 not 2.2.13 ...

Fixed.

http://trac.macports.org/ticket/20743




More information about the macports-users mailing list