The php52 port: is APC available?

Ryan Schmidt ryandesign at macports.org
Thu Dec 10 14:29:46 PST 2009


On Dec 10, 2009, at 16:07, Tom Boutell wrote:

> Today I gave up on PHP 5.3.1 and rolled back to PHP 5.2.11. This is
> the command that succeeded in giving me PHP 5.2 with support for GD,
> MySQL and PDO:
> 
> port deactivate php5
> port install php52 +apache2 +darwin_10 +macosx +apc +curl +gd +iconv
> +mysql5 +posix +xsl

Don't select platform variants like +darwin_10 and +macosx manually. MacPorts will select them for you automatically if appropriate.


> But despite putting +apc on that line I did not get APC support.

The php52 port does not have a variant called +apc, nor one called +curl nor +gd nor +iconv nor +posix nor +xsl. "port variants php52" shows you what variants are available.

Before php5 @5.3.0_1, php5 in MacPorts was monolithic, including all sorts of features by default (including curl, gd, iconv, xml, xsl, etc.) and offering variants for others. This was becoming unwieldy and in later revisions and versions of php5, I broke these features out into separate php5-* ports. Later, someone requested the php52 port, and I created it by copying the last version of php5 that was for 5.2.x, which was still monolithic.


> I considered the possibility that there might be a separate port for
> it, as there is in 5.3. But port install php52-apc says there's no
> such port. The apc from php5-apc is of course not appropriate for
> php52, it was compiled for PHP 5.3.
> 
> I can get by without APC if I really have to, but is it possible to
> get it working? It worked before MacPorts went to 5.3.

php5-apc is compiled for whatever version of php you have active at the time. If you had previously installed php5-apc while php5 @5.3.x was active, try uninstalling php5-apc, then reinstalling it now that you have php52 active. I have not tried this, so let me know what happens.


> For curious PHP programmers who want to know why I rolled back: I am
> exerpiencing persistent segfaults that only occur if I don't call
> exit(0) at the end of my script. It's a complex Symfony application,
> but I've ruled out an infinite recursion bug (sometimes a legitimate
> cause of segfaults at the PHP code level) by verifying that I reach
> the end of the script. I tried attaching to the Apache process via gdb
> and observed the segfault but the 'where' output was unfortunately not
> very enlightening, it didn't seem to include any calls within mod_php.

Please report these problems to the developers of PHP.





More information about the macports-users mailing list