# pecl-APCu with PHP7/7.1



## stratacast1 (Aug 3, 2017)

I'm wondering if there is a way for me to get APCu support for PHP7/7.1 in FreeBSD 11.1, since the existing version only supports PHP 5.6. I see a pecl-APCu in ports (version 5.1.8?) but I'm unable to compile it because it seems to want Perl5-5.24.2 and the current version is Perl5-24.1_1. Curious if anyone got this working and what they did. Thanks!


----------



## SirDice (Aug 3, 2017)

Update your system so you actually have Perl 5.24.2. For building against PHP 7.0 or 7.1 add to /etc/make.conf

```
DEFAULT_VERSIONS+= php7.1
```
Then build devel/pecl-APCu. The default PHP version is 5.6 at this time. So anything that depends on PHP will be built against 5.6. You can change this default using DEFAULT_VERSIONS in /etc/make.conf. See /usr/ports/Mk/bsd.default-versions.mk for more information.


----------



## stratacast1 (Aug 4, 2017)

Is this make.conf file something I have to add to my system? I don't see it in /etc or /usr/local/etc. I wound up having to build 5.24.2 from ports, the current version in FreeBSD 11.1 is still 5.24.1_1


----------



## SirDice (Aug 4, 2017)

stratacast1 said:


> Is this make.conf file something I have to add to my system?


Yes, it doesn't exist by default.



> the current version in FreeBSD 11.1 is still 5.24.1_1


It was updated to 5.24.2 two weeks ago:
https://svnweb.freebsd.org/ports/head/lang/perl5.24/files/?view=log
And is available as package. But you might be using the quarterly packages, not the latest.


----------



## stratacast1 (Aug 5, 2017)

Yup you're right! I got 5.24.2 from ports and continued to compile pecl-APCu, but I think I'm going to recompile it because I jumped the gun and my system MAY have compiled for PHP 5.6 as you say it would be, so even though it's enabled it probably isn't being utilized


----------

