PHP imagick 在错误的路径中搜索 modules/coders
PHP imagick searches for modules/coders in wrong path
我在 Windows 服务器上安装了 ImageMagick、PHP Imagick、Ghostscript。通过 cmd 提示符和 php exec() 函数一切正常。但它不适用于 Imagick Class。
这部分代码:
$im = new Imagick();
$im->setFormat('PNG');
$im->readImageBlob($this->config->item('system_path')."ftp/MAKRO-INFO/x1.png");
returns ImagickException:
Fatal error: Uncaught exception 'ImagickException' with message 'unable to load module `C:\Windows\system32\config\systemprofile\.magick\IM_MOD_RL_PNG_.dll': An unknown error occurred @ error/module.c/OpenModule/1282'
我很惊讶为什么 Imagick 在 windows/system32/ 目录中搜索模块。当然,当拒绝访问此路径时,它不起作用。
我的问题是,where/how 我可以更改此路径(配置文件、注册表或环境变量)吗?
这是我的php信息。如您所见,尚未加载任何模块(支持 0 种格式)。
和路径:
找到解决方案。 ImageMagick 版本和 PHP imagick 版本之间存在冲突。
我使用了这些版本:
ImageMagick-6.8.0-3-Q16
php_imagick-3.2.0RC1-5.4-nts-vc9-x86
我在 Windows 服务器上安装了 ImageMagick、PHP Imagick、Ghostscript。通过 cmd 提示符和 php exec() 函数一切正常。但它不适用于 Imagick Class。 这部分代码:
$im = new Imagick();
$im->setFormat('PNG');
$im->readImageBlob($this->config->item('system_path')."ftp/MAKRO-INFO/x1.png");
returns ImagickException:
Fatal error: Uncaught exception 'ImagickException' with message 'unable to load module `C:\Windows\system32\config\systemprofile\.magick\IM_MOD_RL_PNG_.dll': An unknown error occurred @ error/module.c/OpenModule/1282'
我很惊讶为什么 Imagick 在 windows/system32/ 目录中搜索模块。当然,当拒绝访问此路径时,它不起作用。
我的问题是,where/how 我可以更改此路径(配置文件、注册表或环境变量)吗?
这是我的php信息。如您所见,尚未加载任何模块(支持 0 种格式)。
和路径:
找到解决方案。 ImageMagick 版本和 PHP imagick 版本之间存在冲突。
我使用了这些版本:
ImageMagick-6.8.0-3-Q16
php_imagick-3.2.0RC1-5.4-nts-vc9-x86