SpongeBobPHPPants SpongeBobPHPPants - 2 years ago 279
PHP Question

Installing Imagick extension on PHP 7 nightly on Ubuntu 14.04

I have ImageMagick installed and this, plus the Imagick extension, was working fine in PHP 5.6. Currently using the PHP 7 nightly build on Ubuntu 14.04, installed as per: http://php7.zend.com/

I understand there are compatibility issues, so I have found this https://github.com/mkoppanen/imagick/tree/phpseven and have attempted to install it, basically with:

make install

I then copy the imagick.so file to the extensions_dir and add it to php.ini and restarted Apache. Unfortunately, this isn't working - Imagick doesn't appear in phpinfo.

Does anyone know how to get this working with PHP 7?

Many thanks!

Answer Source

OK, so I did make some pretty basic mistakes here, though hopefully not obscure enough that the eventual solution won't help some people in the future.

The first issue was that I was indeed running phpize from PHP 5 - I thought I had symlinked this properly but I hadn't.

So aside from that, he first command to run was:


My second mistake was that ./configure also assumed I was running PHP 5, so to correct this I had to run:

./configure --with-php-config=/usr/local/php7/bin/php-config

Finally, make and make install worked and copied the files to the correct location automatically.

Thank you @Danack for your comments, they helped!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download