主要解决:ImageMagick number of supported formats:0 。PHP Startup: Unable to load dynamic library ‘imagick’。这两种问题。
重点是设置完windows系统
环境变量后,要重启或注销
系统后,php才能正常识别imagick扩展。经过测试,php7.3、7.4、8.0此方法均适用,8.1未测试。
1.使用php -m 命令查看php扩展加载情况。下图是没有加载imagick扩展。
2.到PECL网站下载imagick的windows扩展包。
3.选择对应版本的PHP扩展,下载到本地。我用的是Nginx1.23,所以我下载nts版本。
4.将下载的压缩包解压到本地,可以是任意位置。以前教程都是解压到C盘,经过我测试其实哪个位置都行,主要是设置好环境变量。
5.设置好imagick的位置的环境变量。如下图,注意路径要正确。
6.设置好以后,到PHP根目录,修改php.ini配置文件,增加一行,保存。
7.将php_imagick-3.7.0-8.0-nts-vs16-x64文件夹中的dll扩展文件,复制到php的ext文件夹下。
8.重启或者注销系统一下。(重要步骤,如果不重启直接去试imagick扩展,会出现奇奇怪怪问题。其他教程没有提到。)
10.验证扩展是否安装成功。以下是使用php -m 命令、phpinfo()、new Imagick() 三种方法进行验证。
Windows 10 X64 LTSC
PHP:8.0.2
Nginx 1.23
imagick扩展:php_imagick-3.7.0-8.0-nts-vs16-x64
If there is no “imagick” section or “supported format” is 0,
something went wrong.
I initially followed:
http://php .net/manual/en/imagick.installation.php
but after installation, PHPInfo under imagick shows
number of supported formats = 0
So I followed these steps, clobbered from various sources
to get it to work.
Open PHPInfo and check:
Architecture = x86 or x64
Thread Safety = yes or no
Download ImageMagick from:
http://windows.php.net/downloads/pecl/deps/
In my case I downloaded: ImageMagick-6.9.3-7-vc11-x86.zip
because the Architecture under PHPInfo is x86
as for vc11 or vc14
search google for “visual c++ 11 runtime” or
“visual c++ 14 runtime” and install it
Unzip and copy all dlls from the bin subfolder to the
Apache bin directory. It’s a bunch of CORE_RL_.dll
and IM_MOD_RL_.dll plus a few other dlls.
In my case, I installed UwAmp in C:\UwAmp, so:
(from zip) bin/*.dll --> C:\UwAmp\bin\apache\bin
4. Goto:
http://pecl.php.net/package/imagick
as of today, latest is 3.4.1 so I went to:
http://pecl.php.net/package/imagick/3.4.1/windows
My PHP version is: 5.6.18, and Thread Safety is Yes from
Step #1, so I downloaded:
5.6 Thread Safe (TS) x86
I got: php_imagick-3.4.1-5.6-ts-vc11-x86.zip
Unzip and copy “php_imagick.dll” to the php extension folder:
In my case:
php_imagick.dll --> C:\UwAmp\bin\php\php-5.6.18\ext
Note: this ZIP also contains dlls which other guides says
to extract to the extension folder of apache.
NO NEED TO DO IT. Step #3 has taken care of it.
Edit “php.ini” and add at the very end (could be
anywhere I suppose):
[Imagick]
extension=php_imagick.dll
For super newbies: click the edit button in the UwAmp UI,
“php_uwamp.ini” will open and edit it. It will be copied to
the correct php.ini when UwAmp is restarted. I had
trouble at first since there are several php*.ini scattered
all over.
Restart Apache
Check PHPInfo
scroll to section (or find): imagick
number of supported formats: 234
Hope this helps.
在 Windows 10 64 位、PHP 7.4.6 中,报错:PHP Warning: PHP Startup: Unable to load dynamic library ‘imagick’
LiveNVR配置连接REDIS通过redis订阅通道状态1、配置连接REDIS2、REDIS订阅 - 订阅通道状态2.1、订阅通道状态2.2、上线消息2.3、离线消息3、RTSP/HLS/FLV/RTMP拉流Onvif流媒体服务1、配置连接REDISLiveNVR配置连接REDIS 示例:在解压目录下 livenvr.ini 里配置,添加[redis]配置块 ,如:[redis]host=127.0.0.1port=6379password=test2、REDIS订阅 - 订阅通道状态
DC06PE01#include "allinclude.h"int commonAncestor_0601(SqBiTree T, int i, int j)/* 求出完全二叉树T中编号i和j的两个结点的 最近公共祖先结点的编号 i和j的范围不合理,则返回0*/{ if (i < 1 || i > T.lastIndex || j < 1 || j > T.lastIndex) return 0; // i和j的范围不合理 wh._void postorder(bitree t,status(*visit)(telemtype))
问题及代码:/** Copyright (c) 2014, 烟台大学计算机学院* All rights reserved.* 文件名称:Project4.cpp* 作 者:李楠* 完成日期:2014年12月11日* 版 本 号:v1.0** 问题描述:用数组名作形参方案 去除字符串str的特定字符,如空格,结果仍保存在原字符串中。* 输入描述:略*_设定字符串strs=98 76 5 21
2019独角兽企业重金招聘Python工程师标准>>> 一、创建上传方法public function uploadimg(){$image = $_FILES['file'];$filebase = file_get_contents($image['tmp_name']);$upimg = $this->uploadImage($filebase);$upfile['c...
还有就是"""Set up the plot figures, axes, and items to be done for each frame.This module is imported by the plotting routines and then thefunction setplot is called to set the plot parameters."""这句话是什么意思..._matlab代码中有#
随着业务系统每年收集和使用的数据飞速增长,数据体量日趋增长,数据形态多样化且不统一,多种数据源之间的采集、传播和共享遇到困难。元数据管理作为大数据治理的核心,是有效管理这些数据的基础和前提,在信息化建设中发挥着重要的作用。如何理解、管理并发挥出元数据的价值,成为迫切的任务。一、什么是元数据 元数据(Metadata)是关于数据的数据。元数据是描述数据仓库内数据的结构和建立方法的数据。可将...
_高程 asc 转出xyz
一、银联开放平台https://open.unionpay.com/tjweb/api/detail?apiSvcId=21应用场景综合数据服务平台是银联为接入商户提供的综合数据认证服务接口,目前业务支持场景包括:银行卡各类信息验证、身份证相关信息验证、三大运营商认证等丰富的认证服务。银行卡信息验证支持5种模式:1.银行卡2要素(银行卡+姓名)认证:商户上传所要验证..._青岛银行商户api
无论市场怎么变化,搜索流量都是我们作为淘宝商家最想要的流量类型,没有之一!那大家其实也都知道搜索流量的重要性,但究竟该如何获取搜索流量。最基础的还是先要把搜索流量的基础,关键词给理清楚!只有知道了关键词有哪些类型,才能知道我们在哪个阶段需要去获取什么样类型的关键词,才能真正做到有的放矢。今天小编就给大家分享一下,我们的关键词有哪些类型,并且这些类型的关键词,我们应该什么时候用,以及怎么用!一、关键词的类型关键词的类型通常我们分成三种,分别是大词、属性词以及碎片化关键词。1、大词:大词..
C语言常常让人觉得它所能表达的东西非常有限。它不具有类似第一级函数和模式匹配这样的高级功能。但是C非常简单,并且仍然有一些非常有用的语法技巧和功能,只是没有多少人知道罢了。指定的初始化很多人都知道像这样来静态地初始化数组:int fibs[] = {1, 1, 2, 3, 5};C99标准实际上支持一种更为直观简单的方式来初始化各种不同的集合类数据(如:结构体,联合体和数组)。数组我们可以指定数组...
关于信息熵及信源熵率摘 要:熵与温度、压力、焓等一样,也是反映物质内部状态的一个物理量。它不能直接用仪表测量,只能推算出来,所以比较抽象。在作理论分析时,有时用熵的概念比较方便。该文指出了如何用统计物理的方法计算随机过程的多重分形维,以二态隐马尔可夫信源作为例子,该文计算了其熵率。计算结果和理论结果的比较表明,用统计物理的方法计算隐马尔可夫过程熵率具有实用价值。这一方法可以推广到一般信源熵率的数值..._c语言马尔可夫预测器的熵估计