Php-imagick php7(cli)+php5.6(suphp): различия между версиями
Перейти к навигации
Перейти к поиску
Sol (обсуждение | вклад) (Новая страница: «Категория:DirectAdmin Категория:Web == Входящая информация == uname -r 3.10.0-327.22.2.el7.x86_64 cat /etc/redhat-…») |
Sol (обсуждение | вклад) |
||
(не показано 5 промежуточных версий этого же участника) | |||
Строка 12: | Строка 12: | ||
php7 - cli mode (system php) | php7 - cli mode (system php) | ||
+ | |||
php5.6 - suphp mode (/usr/local/php56)cd | php5.6 - suphp mode (/usr/local/php56)cd | ||
− | |||
− | |||
− | |||
├── bin | ├── bin | ||
│ ├── pear | │ ├── pear | ||
Строка 25: | Строка 23: | ||
│ ├── php -> /usr/local/php56/bin/php56 | │ ├── php -> /usr/local/php56/bin/php56 | ||
│ ├── php56 | │ ├── php56 | ||
− | + | | ├── php-cgi -> /usr/local/php56/bin/php-cgi56 | |
│ ├── php-cgi56 | │ ├── php-cgi56 | ||
│ ├── php-config -> /usr/local/php56/bin/php-config56 | │ ├── php-config -> /usr/local/php56/bin/php-config56 | ||
Строка 37: | Строка 35: | ||
│ └── php-fpm.conf.default | │ └── php-fpm.conf.default | ||
├── include | ├── include | ||
− | + | | └── php | |
├── lib | ├── lib | ||
│ ├── php | │ ├── php | ||
Строка 53: | Строка 51: | ||
└── run | └── run | ||
− | + | == Решение == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | yum install ImageMagick ImageMagick-devel |
+ | |||
+ | cd /usr/src | ||
+ | wget https://pecl.php.net/get/imagick-3.4.3RC1.tgz | ||
+ | wget https://pecl.php.net/get/imagick-3.4.4.tgz | ||
+ | |||
+ | ''- Fixes for :imagick-3.4.3RC1'' | ||
+ | '' * Bug 72311 - compiling against PHP 7.1.'' | ||
+ | '' * Bug 72226 - regression for Imagick Exception classes being final on 7.x'' | ||
+ | tar zxf imagick-3.4.3RC1.tgz | ||
+ | cd imagick-3.4.3RC1 | ||
+ | phpize | ||
+ | ./configure --with-imagick=/usr/local --with-php-config=/usr/local/bin/php-config | ||
+ | make | ||
+ | make install | ||
+ | На выходе: | ||
+ | ''Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/'' | ||
+ | ''Installing header files: /usr/local/include/php/'' | ||
+ | echo "extension=imagick.so" >> /usr/local/lib/php.conf.d/10-directadmin.ini | ||
+ | httpd -t | ||
+ | systemctl restart httpd | ||
+ | php -m |grep imagick | ||
+ | |||
+ | '''^^ php7 ^^''' | ||
+ | |||
+ | cd /usr/src/imagick-3.4.3RC1 | ||
+ | /usr/local/php56/bin/phpize56 | ||
+ | ./configure --with-imagick=/usr/local --with-php-config=/usr/local/php56/bin/php-config56 | ||
+ | make | ||
+ | make install | ||
+ | На выходе: | ||
+ | ''Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/'' | ||
+ | ''Installing header files: /usr/local/include/php/'' | ||
+ | echo "extension=imagick.so" >> /usr/local/php56/lib/php.conf.d/10-directadmin.ini | ||
+ | /usr/local/php56/bin/php56 -m |grep imagick |
Текущая версия на 12:40, 4 сентября 2020
Входящая информация
uname -r
3.10.0-327.22.2.el7.x86_64
cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
Directadmin v 1.50.1
php7 - cli mode (system php)
php5.6 - suphp mode (/usr/local/php56)cd
├── bin │ ├── pear │ ├── peardev │ ├── pecl │ ├── phar -> phar.phar │ ├── phar.phar │ ├── php -> /usr/local/php56/bin/php56 │ ├── php56 | ├── php-cgi -> /usr/local/php56/bin/php-cgi56 │ ├── php-cgi56 │ ├── php-config -> /usr/local/php56/bin/php-config56 │ ├── php-config56 │ ├── phpize -> /usr/local/php56/bin/phpize56 │ ├── phpize56 │ └── php_uploadscan.sh ├── etc │ ├── pear.conf │ ├── php-fpm.conf │ └── php-fpm.conf.default ├── include | └── php ├── lib │ ├── php │ ├── php.conf.d │ └── php.ini ├── php │ ├── man │ └── php ├── sbin │ ├── php-fpm -> /usr/local/php56/sbin/php-fpm56 │ └── php-fpm56 ├── sockets └── var ├── log └── run
Решение
yum install ImageMagick ImageMagick-devel cd /usr/src wget https://pecl.php.net/get/imagick-3.4.3RC1.tgz wget https://pecl.php.net/get/imagick-3.4.4.tgz - Fixes for :imagick-3.4.3RC1 * Bug 72311 - compiling against PHP 7.1. * Bug 72226 - regression for Imagick Exception classes being final on 7.x tar zxf imagick-3.4.3RC1.tgz cd imagick-3.4.3RC1 phpize ./configure --with-imagick=/usr/local --with-php-config=/usr/local/bin/php-config make make install На выходе: Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ Installing header files: /usr/local/include/php/ echo "extension=imagick.so" >> /usr/local/lib/php.conf.d/10-directadmin.ini httpd -t systemctl restart httpd php -m |grep imagick ^^ php7 ^^ cd /usr/src/imagick-3.4.3RC1 /usr/local/php56/bin/phpize56 ./configure --with-imagick=/usr/local --with-php-config=/usr/local/php56/bin/php-config56 make make install На выходе: Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ Installing header files: /usr/local/include/php/ echo "extension=imagick.so" >> /usr/local/php56/lib/php.conf.d/10-directadmin.ini /usr/local/php56/bin/php56 -m |grep imagick