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:
1 2 3 |
PHP Warning: PHP Startup: imagick: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 |
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.
1 2 3 4 5 |
apt-get remove php5-dev apt-get autoremove apt-get install php5-dev pecl uninstall imagick pecl install imagick |
That’s all.
Basically, if you want to install imagick for the first time you can use the following commands:
1 2 3 |
apt-get install php-pear php5-dev apt-get install imagemagick libmagickwand-dev pecl install imagick |
Add File imagick.ini in :
/etc/php5/cli/conf.d and
/etc/php5/apache2/conf.d
With content:
1 2 |
; configuration for php imagick module extension=imagick.so |