linux 系统 windows系统 phpstudy 安装 imagick 扩展

其他博客

https://blog.csdn.net/json_ligege/article/details/130227725

1. 下载 imagemagick.org 注意版本对应

官网
https://imagemagick.org/script/download.php#windows
github地址 //老版本需要自己编译
https://github.com/ImageMagick/ImageMagick/releases

其他地址
https://windows.php.net/downloads/pecl/deps/

2 . 下载动态链接

下载地址一: http://windows.php.net/downloads/pecl/releases/imagick/
下载地址二: https://pecl.php.net/package/imagick

3.安装ghostscript

imagick操作pdf需要ghostscript
下载地址Ghostscript : Downloads
下载windows的32/64公共版本

4. 把文件添加到ext 目录

php_imagick.dll

5. 添加启动扩展

extension=imagick

在php.ini 添加 可以使用phpstudy 里面内置的设置 添加

6. 可以屏蔽提示

可以添加到最后一行,记得空一行 不能挨着最后
imagick.skip_version_check=true

linux 里面我用的是宝塔

安装好报错

ImagickException: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r250x250' -dPrinted=false '-sOutputFile=/tmp/magick-gukP4sx_KzDpos2K6UXdGAuICMELuZsA%d' '-f/tmp/magick-HGd_kUXY_h7nFUP5nkA4KhLoajBzJZbW' '-f/tmp/magick-fnVTeqjwKkQaJfMsqaFbPHtlXE4kC0Uh'' (32512)

安装 组件后正常

yum install ghostscript

你可能感兴趣的:(php学习,php扩展,php,扩展屏应用开发)