I have been trying for hours to get ImageMagick working on my localhost (running XAMPP 1.8.3 on Windows 7). I have checked and tried literally every solution that I can find on this website, and dozens of others. Nothing works. No matter what combination of ImageMagick builds and imagick DLLs I try, I always get some kind of "can't find dll" error when I try to start Apache (the specific message varies based on what combination I'm trying, but it's always some sort of missing DLL message). Can anyone just give me a (moderately recent) combination of XAMPP/ImageMagick/Imagick that works?
我一直在努力让ImageMagick在我的localhost上工作(在Windows 7上运行XAMPP 1.8.3)。我已经检查并尝试了我可以在本网站上找到的所有解决方案,以及其他几十种解决方案。什么都行不通。无论我尝试使用ImageMagick构建和想象DLL的哪种组合,当我尝试启动Apache时,我总会得到某种“找不到dll”错误(具体的消息因我正在尝试的组合而异,但它始终是某种缺失的DLL消息)。任何人都可以给我一个(适度近期)XAMPP / ImageMagick / Imagick的组合吗?
3 个解决方案
#1
34
OK. I finally found a combination that works. After MUCH trial and error, I was finally able to get the below combination to work on my machine. Hopefully it works for anyone else who might be struggling with this.
好。我终于找到了一个有效的组合。经过多次试验和错误,我终于能够得到以下组合在我的机器上工作。希望它适用于任何可能正在努力解决这个问题的人。
- OS: Windows 7 64 Bit
- 操作系统:Windows 7 64位
- PHP: 5.5.6
- PHP:5.5.6
- XAMPP: 1.8.3
- Compiler: MSVC11
- 编译器:MSVC11
- Architecture: x86
- 架构:x86
- XAMPP:1.8.3编译器:MSVC11架构:x86
- ImageMagick: ImageMagick-6.7.7-5-Q16-windows-dll (available here)
- ImageMagick:ImageMagick-6.7.7-5-Q16-windows-dll(此处可用)
- Imagick DLL: PHP5.5.x version from http://www.peewit.fr/imagick/
- Imagick DLL:来自http://www.peewit.fr/imagick/的PHP5.5.x版本
Note: Once I tried this, Apache started without any error messages. I did not have to restart my computer (just restarted Apache). I do have ImageMagick installed in a directory that has no spaces in the name (as some have suggested that might be a problem with some installs). In my case, I installed it to c:\xampp\imagemagick.
注意:尝试此操作后,Apache启动时没有任何错误消息。我没有必要重新启动计算机(刚重启Apache)。我确实将ImageMagick安装在名称中没有空格的目录中(正如有人建议某些安装可能存在问题)。在我的例子中,我将它安装到c:\ xampp \ imagemagick。
Best of luck to you!
祝你好运!
#2
13
Imagick is a PECL extension and the official windows.php.net site has compiled versions of PECL extensions.
Imagick是一个PECL扩展,官方的windows.php.net网站已经编译了PECL扩展版本。
Please download Imagick from: http://windows.php.net/downloads/pecl/releases/imagick/
请从以下网址下载Imagick:http://windows.php.net/downloads/pecl/releases/imagick/
And download ImageMagick from: http://windows.php.net/downloads/pecl/deps/
并从以下网址下载ImageMagick:http://windows.php.net/downloads/pecl/deps/
Please note, downloading Imagick from one site, and downloading ImageMagick from another site is likely to not work! This is because when Imagick is compiled it uses several settings that vary based on what versions of ImageMagick it is being compiled against.
请注意,从一个站点下载Imagick,从另一个站点下载ImageMagick可能无法正常工作!这是因为当编译Imagick时,它会使用几个设置,这些设置根据编译的ImageMagick版本而有所不同。
FYI the maintainer of the Imagick extension recommends not running it inside Apache, but instead to run it as a background task through something like SupervisorD or cron. This is both for security and performance reasons.
仅供参考,Imagick扩展程序的维护者建议不要在Apache中运行它,而是通过SupervisorD或cron之类的东西将其作为后台任务运行。这是出于安全和性能原因。
#3
2
After spending many hours trying to get this blasted thing to work (Windows 7, 64-bit), with no success, I decided to look at other systems to see how they handled the problem. What mediawiki did was simply NOT USE the ImageMagick/PHP extension! They call the ImageMagick convert.exe program directly and use the result (see includes/media/Bitmap.php in the mediawiki package).
花了好几个小时试图让这个爆炸的东西工作(Windows 7,64位),但没有成功,我决定看看其他系统,看看他们是如何处理这个问题的。 mediawiki所做的只是不使用ImageMagick / PHP扩展!他们直接调用ImageMagick convert.exe程序并使用结果(请参阅mediawiki包中的includes / media / Bitmap.php)。
You can't really blame people for abandoning the PHP extension, since apparently it has to be compiled with the "right" ever-varying compiler and matched at least with apache and ImageMagick builds. What is surprising about the situation is that this problem has been going on for over five years and it still isn't handled.
你不能真的责怪人们放弃PHP扩展,因为显然它必须使用“正确的”不断变化的编译器进行编译,并至少与apache和ImageMagick构建匹配。令人惊讶的是,这个问题已经持续了五年多,而且仍然没有得到解决。
So my "solution/answer" isn't really one, it basically is to call ImageMagick a different way to avoid the problem, like mediawiki did.
所以我的“解决方案/答案”并不是真的,它基本上是以不同的方式调用ImageMagick以避免问题,就像mediawiki那样。
#1
34
OK. I finally found a combination that works. After MUCH trial and error, I was finally able to get the below combination to work on my machine. Hopefully it works for anyone else who might be struggling with this.
好。我终于找到了一个有效的组合。经过多次试验和错误,我终于能够得到以下组合在我的机器上工作。希望它适用于任何可能正在努力解决这个问题的人。
- OS: Windows 7 64 Bit
- 操作系统:Windows 7 64位
- PHP: 5.5.6
- PHP:5.5.6
- XAMPP: 1.8.3
- Compiler: MSVC11
- 编译器:MSVC11
- Architecture: x86
- 架构:x86
- XAMPP:1.8.3编译器:MSVC11架构:x86
- ImageMagick: ImageMagick-6.7.7-5-Q16-windows-dll (available here)
- ImageMagick:ImageMagick-6.7.7-5-Q16-windows-dll(此处可用)
- Imagick DLL: PHP5.5.x version from http://www.peewit.fr/imagick/
- Imagick DLL:来自http://www.peewit.fr/imagick/的PHP5.5.x版本
Note: Once I tried this, Apache started without any error messages. I did not have to restart my computer (just restarted Apache). I do have ImageMagick installed in a directory that has no spaces in the name (as some have suggested that might be a problem with some installs). In my case, I installed it to c:\xampp\imagemagick.
注意:尝试此操作后,Apache启动时没有任何错误消息。我没有必要重新启动计算机(刚重启Apache)。我确实将ImageMagick安装在名称中没有空格的目录中(正如有人建议某些安装可能存在问题)。在我的例子中,我将它安装到c:\ xampp \ imagemagick。
Best of luck to you!
祝你好运!
#2
13
Imagick is a PECL extension and the official windows.php.net site has compiled versions of PECL extensions.
Imagick是一个PECL扩展,官方的windows.php.net网站已经编译了PECL扩展版本。
Please download Imagick from: http://windows.php.net/downloads/pecl/releases/imagick/
请从以下网址下载Imagick:http://windows.php.net/downloads/pecl/releases/imagick/
And download ImageMagick from: http://windows.php.net/downloads/pecl/deps/
并从以下网址下载ImageMagick:http://windows.php.net/downloads/pecl/deps/
Please note, downloading Imagick from one site, and downloading ImageMagick from another site is likely to not work! This is because when Imagick is compiled it uses several settings that vary based on what versions of ImageMagick it is being compiled against.
请注意,从一个站点下载Imagick,从另一个站点下载ImageMagick可能无法正常工作!这是因为当编译Imagick时,它会使用几个设置,这些设置根据编译的ImageMagick版本而有所不同。
FYI the maintainer of the Imagick extension recommends not running it inside Apache, but instead to run it as a background task through something like SupervisorD or cron. This is both for security and performance reasons.
仅供参考,Imagick扩展程序的维护者建议不要在Apache中运行它,而是通过SupervisorD或cron之类的东西将其作为后台任务运行。这是出于安全和性能原因。
#3
2
After spending many hours trying to get this blasted thing to work (Windows 7, 64-bit), with no success, I decided to look at other systems to see how they handled the problem. What mediawiki did was simply NOT USE the ImageMagick/PHP extension! They call the ImageMagick convert.exe program directly and use the result (see includes/media/Bitmap.php in the mediawiki package).
花了好几个小时试图让这个爆炸的东西工作(Windows 7,64位),但没有成功,我决定看看其他系统,看看他们是如何处理这个问题的。 mediawiki所做的只是不使用ImageMagick / PHP扩展!他们直接调用ImageMagick convert.exe程序并使用结果(请参阅mediawiki包中的includes / media / Bitmap.php)。
You can't really blame people for abandoning the PHP extension, since apparently it has to be compiled with the "right" ever-varying compiler and matched at least with apache and ImageMagick builds. What is surprising about the situation is that this problem has been going on for over five years and it still isn't handled.
你不能真的责怪人们放弃PHP扩展,因为显然它必须使用“正确的”不断变化的编译器进行编译,并至少与apache和ImageMagick构建匹配。令人惊讶的是,这个问题已经持续了五年多,而且仍然没有得到解决。
So my "solution/answer" isn't really one, it basically is to call ImageMagick a different way to avoid the problem, like mediawiki did.
所以我的“解决方案/答案”并不是真的,它基本上是以不同的方式调用ImageMagick以避免问题,就像mediawiki那样。