Upgrade PHP 5.5 to 5.6 and PHP Warning PHP Startup Unable to initialize module

How to upgrade PHP to 5.6 is not a big challenge. In some cases , some manuell installed modul over pecl like imagick will not properly works. This is because some modul are compiled with the oldĀ  php module.

The error looks like:

So the new php 5.6 in this case is compiled with module API=20131226 . All what you have to do is to upgrade the php5-dev package and reinstall the modul again. In this case imagick.

That’s all.

Basically, if you want to install imagick for the first time you can use the following commands:

Add File imagick.ini in :
/etc/php5/cli/conf.d and
/etc/php5/apache2/conf.d
With content: