Categories: 網頁設計

windows 安裝 imagick

php5.3.13
httpd2.2.22
mysql5.5.24-32b

不使用 x64 版本是因為有很多 dll 找不到能跑的,而且做為
快速開發環境的本意,追求過新的版本似乎也沒啥意義

這個版本的 Compiler 是 MSVC9 (Visual C++ 2008),這個資訊
相當重要,因為所找的 dll 必需是 x86 / VC9 版本才行。

從這邊 http://valokuva.org/builds/ 有人提供了一些 dll
不過好像都失敗 /_,目前手邊這個 php_imagick_ts.dll
可以運作,只不過忘了在哪邊找的到,dll資訊如下

檔案版本:5.3.16.0
產品版本:5.3.6-dev
大小:262 KB

接下來就是要安裝 Imagemagick,這特別要注意不要下載最新的版本
因為會我個人測試結果是雖然 phpinfo 顯示 Imagick 安裝起來了

ImageMagick-6.8.0-0-Q16-windows-dll.exe

可以從這裡 http://goo.gl/BUpAjs 找到舊版本的下載點
另外記得也必需安裝 Microsoft Visual C++ 2008 Redistribultable
(可轉發套件) http://goo.gl/Ika4b

總結整理步驟如下:

1) 安裝 MSVC++ 2008 Redistribultable.exe
2) 安裝 Imagemagick6.8.0-0-Q16-windows.dll.exe
3) 將 php_imagick_ts.dll 複製到 C:wampbinphpphp5.3.13ext
4) 設定 php.ini 追加 extension=php_imagick_ts.dll,然後重開wamp
5) 檢查 C:wamplogsapache_error.log 有沒有錯誤訊息
6) 輸出 phpinfo() 資訊裡面 Imagick 有沒有跑出來
7) 使用 PHP 官方範例 http://goo.gl/kOHZse 看看有沒有正常運作
這邊要注意的是 new Imagick() 的路徑參數,要使用絕對路徑

$im = new Imagick(‘image.jpg’); 將會找不到檔案(明明就在同一層)

要改成這樣
$im = new Imagick(realpath(‘image.jpg’)); 才會正確的載入到圖片
=======================================================
windows install imagick

php5.3.13
httpd2.2.22
mysql5.5.24-32b

Do not use the x64 version because there are a lot of run dll not found , but as
Rapid development environment intended to pursue over the new version also seems lacks significance

This version of the Compiler is MSVC9 (Visual C + + 2008), this information
Is important because search is required dll x86 / VC9 version of the job .

From here http://valokuva.org/builds/ someone provide some dll
But it seems to have failed / _ , currently at hand this php_imagick_ts.dll
Can operate , but forgot to look at which side , dll follows

File Version : 5.3.16.0
Product Version :5.3.6-dev
Size : 262 KB

The next step is to install Imagemagick, which is particularly careful not to download the latest version
Because I personally test results will be displayed although phpinfo Imagick installed up

ImageMagick-6.8.0-0-Q16-windows-dll.exe

You can find the old version Download from here http://goo.gl/BUpAjs
Also remember must also install Microsoft Visual C + + 2008 Redistribultable
( Can be forwarded Kit ) http://goo.gl/Ika4b

Finishing steps are summarized as follows :

1 ) install MSVC + + 2008 Redistribultable.exe
2 ) Installation Imagemagick6.8.0-0-Q16-windows.dll.exe
3 ) Copy php_imagick_ts.dll to C: wamp bin php php5.3.13 ext
4 ) Set additional php.ini extension = php_imagick_ts.dll, then re-opened wamp
5 ) Check the C: wamp logs apache_error.log there is no error message
6 ) output phpinfo () There is no information on which to run out Imagick
7 ) Use the official PHP examples http://goo.gl/kOHZse see if there is normal operation
It should be noted here is the new Imagick () path parameters , to use absolute paths

$ im = new Imagick (‘image.jpg’); would not find the file ( obviously on the same level )

To change this
$ im = new Imagick (realpath (‘image.jpg’)); will be loaded into the correct picture

yan

Share
Published by
yan