# suhosin patch stops build of devel/pear



## ohauer (Oct 4, 2009)

Is there a way to build devel/pear if php5 was build with suhosin patch?

The port stops exact at this command in Makefile

```
do-install:
   @${LOCALBASE}/bin/php -q ${WRKSRC}/go-pear
```
with this error message 


> suhosin[44747]: ALERT - canary mismatch on efree() - heap overflow detected (attacker 'REMOTE_ADDR not set', file 'unknown')


The same error is displayed if php is called from the command line for example with parameter -info or something else.

My workaround was to build php without suhosin and then the pear port.
The strange thing now is the command

```
/usr/local/bin/php -info
```
 works but 

```
/usr/local/bin/php -h
```
 results in a


> Segmentation fault (core dumped)



However It seems the port I really want build (tinderbox) is working.


----------



## ohauer (Oct 18, 2009)

*[solved] suhosin patch stops build of devel/pear*

After invest a time frame to look why the build breaks I found the real issue.

The reason php5 crashed was not the suhosin patch, it was the combination of apache22 build with mpm_worker and php5-pgsql.

Solution was:
Rebuild apache22 with mpm_prefork solved any issues.


----------

