docker php-fpm 7 + yii 2.0
docker pull daocloud.io/php:7.0.2-fpm later, yii
In addition to mbstring not being initialized and installed, imagick is not installed either.
Installation method:
1 Download the latest version of the source code from https://pecl.php.net/package/imagick.
After decompression:
<code>phpize ./configure <span>make</span> && <span>make</span> install</code>
Because the default mirror system is debian 8, use the following command:
<code>apt<span>-get</span> install libmagickwand<span>-dev</span> libmagickcore<span>-dev</span></code>
Install the dependency package first.
<code>Installing shared extensions: /usr/<span>local</span>/lib/php/extensions/no<span>-debug</span><span>-non</span><span>-zts</span><span>-</span><span>20151012</span><span>/</span> Installing <span>header</span> files: /usr/<span>local</span>/include/php<span>/</span></code>
The last two lines indicate the location of the expansion installation. You need to write it into php.ini and restart php-fpm to take effect.
If you don’t have /usr/local/etc/php/php.ini yet, you can copy it from here first:
<code>/usr/src/php/php<span>.ini</span>-development /usr/src/php/php<span>.ini</span>-production</code>
This will solve the problem:
<code>Invalid Configuration – yii\base\InvalidConfigException Either GD PHP <span>extension</span><span>with</span> FreeType support <span>or</span> ImageMagick PHP <span>extension</span><span>with</span> PNG support <span>is</span> required.</code>
The above introduces the docker installation of php7 imagick, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.