# Error installing PEAR.



## dejamuse (Oct 17, 2013)

I installed PHP53 and PHP53-extensions from ports with no problems, but apparently FreeBSD doesn't bundle PEAR. I need PEAR to install PECL-APC because just using the port wants to install PHP5.4 as a dependency, which I don't want. I'm running FBSD FreeBSD 9.2. I did:

`$ wget [url]http://pear.php.net/go-pear.phar[/url]`
`$ php go-pear.phar`

Then I get this error:


```
/usr/local/lib/php/20090626/mbstring.so: Undefined symbol "zend_multibyte_set_internal_encoding"
```

Any ideas why? Why doesn't FBSD FreeBSD bundle PEAR with PHP? 

Thanks,

Jeff


----------



## dejamuse (Oct 17, 2013)

I fixed this by uninstalling mbstring, installing PEAR and then reinstalling mbstring. But now, when I try to install APC via PECL: `# pecl install apc` it bombs with a string of PHP errors like:


```
Warning: Invalid argument supplied for foreach() in /usr/local/share/pear/PEAR/Command.php on line 259
XML Extension not found
```
Even just doing: `# pecl install` will trigger the error. All the XML PHP extensions are installed.

What's wrong?

Thanks,

Jeff


----------

