# php + imagick trouble



## moronizzz (Feb 11, 2010)

Hello!


```
[root@localhost ~]# uname -a
FreeBSD localhost 7.2-RELEASE FreeBSD 7.2-RELEASE

[root@localhost ~]# php -v
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Feb  4 2010 19:14:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
```

php install from ports, after installing pecl-imagick from ports a problem arises:


```
[root@localhost ~]# pkg_info | grep imagick
pecl-imagick-2.3.0_1 Provides a wrapper to the ImageMagick/GraphicsMagick librar

[root@localhost ~]# php -m
ALERT - canary mismatch on efree() - heap overflow detected (attacker 'REMOTE_ADDR not set', file 'unknown')
```

If i remove "extension=imagick.so" from /usr/local/etc/php/extensions.ini then all is ok.

any ideas?

PS sorry for my english


----------



## SirDice (Feb 11, 2010)

Try what the last post suggests here:
http://www.suspekt.org/2008/10/12/suhosin-canary-mismatch-on-efree-heap-overflow-detected/

Add to php.ini:

```
suhosin.session.encrypt=off
```


----------



## moronizzz (Feb 11, 2010)

thanks.

I added this line in my php.ini, but this not solved problem.


----------



## pczone (Sep 22, 2010)

I also have this problem @ my FreeBSD7 & FreeBSD8 servers.

phpinfo show imagick OK , but php -v got erroe message.

[CMD=""]php -v[/CMD]

```
ALERT - canary mismatch on efree() - heap overflow detected (attacker 'REMOTE_ADDR not set', file 'unknown')
```

You can try this , I fixed it.

http://forums.freebsd.org/showthread.php?t=5452

http://wiki.cyberleo.net/wiki/KnowledgeBase/FreeBSD/envhack.c


----------

