# Pear FreeBSD 11



## wisdown (Oct 2, 2016)

I have a question about devel/pear package.

On my enviroment can not compile from source, and when I try add using pkg that shows as dependencies for be installed together:


```
php56-zlib: 5.6.26
php56: 5.6.26
php56-xml: 5.6.26
```

On my enviroment I am using PHP 7, and reading about pear package, seems its full compatible with PHP 7 (http://blog.pear.php.net/2015/10/07/pear-1-10-0/), so, this package on FreeBSD is outdate?

I mean, instead use xml and zlib both from PHP 7 why still calling from 5.6?


----------



## Remington (Oct 3, 2016)

If you want pear to use php 7.0 then you will need to use the ports instead of binary package.  You can add this line to your /etc/make.conf to force the ports to use PHP 7.0.


```
# This line is current
DEFAULT_VERSIONS+=php=70

# This line is depreciated
DEFAULT_PHP_VER?=       70
```

Edit /usr/ports/Mk/bsd.default-versions.mk and change to PHP_DEFAULT?=7.0 and this is also depreciated.  Not all ports are updated to use current default declarations.


----------



## SirDice (Oct 3, 2016)

Remington said:


> Edit /usr/ports/Mk/bsd.default-versions.mk and change to PHP_DEFAULT?=7.0 and this is also depreciated.


Never edit this file. Use the settings in /etc/make.conf. Edits to bsd.default-versions.mk will be lost the next time you update the ports tree.


----------



## wisdown (Oct 3, 2016)

I have found what make the error on pear (the segmentation fault), the extension imap from lang/php70-extensions.

If I uncheck imap pear and pcl works, my current version of extension imap is 7.0.6, so my workaround is update all other extensions in use to 7.0.11 and keep the old imap 7.0.6.

After try an full update of system, I have noticed I need exclude mail/php70-imap from updates also.


----------



## SirDice (Oct 4, 2016)

Note that lang/php70-extensions is a so-called meta-port. It doesn't install anything of itself, it simply depends on other ports. Enabling IMAP just pulls in mail/php70-imap. Any extension can be installed separately, they don't require the lang/php70-extensions to be installed.


----------

