先說我目前的主機所安裝討論區的規格:
Win XP + IIS 5.1 + PHPBB 2.0.6 + attach_mod 2.3.9 + ImageMagick 6.0.0-q8
原本是已經可以上傳圖檔地說,但是太大的圖會把板面撐開,不美觀。
所以裝了 imagemagick 只是想做縮圖的動作而已,但是上傳圖片後,卻出現以下錯誤訊息:
Warning: passthru(): Unable to fork [C:\Program Files\ImageMagick-6.0.0-Q8\convert.exe -quality 85 -antialias -sample 267x200 "I:/Web/Yamaha/files/pict0004.jpg" +profile "*" "I:/Web/Yamaha/files/thumbs/t_pict0004.jpg"] in I:\Web\Yamaha\attach_mod\includes\functions_thumbs.php on line 176
Warning: passthru(): Unable to fork [C:\Program Files\ImageMagick-6.0.0-Q8\convert.exe -quality 85 -antialias -sample 267x200 "C:/PHP/uploadtemp/php9E0.tmp" +profile "*" "I:/Web/Yamaha/files/thumbs/t_pict0004.jpg"] in I:\Web\Yamaha\attach_mod\includes\functions_thumbs.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at I:\Web\Yamaha\attach_mod\includes\functions_thumbs.php:176) in I:\Web\Yamaha\includes\page_header.php on line 474
Warning: Cannot modify header information - headers already sent by (output started at I:\Web\Yamaha\attach_mod\includes\functions_thumbs.php:176) in I:\Web\Yamaha\includes\page_header.php on line 476
Warning: Cannot modify header information - headers already sent by (output started at I:\Web\Yamaha\attach_mod\includes\functions_thumbs.php:176) in I:\Web\Yamaha\includes\page_header.php on line 477
因我在這找了好久,各位大大多半是和4images一同使用,但我儘想做個縮圖而已,美不美觀倒還是其次說。
還請各位大大幫忙解決一下。
[問題]ImageMagick 縮圖問題
版主: 版主管理群
在 說明書裡有一段\r
7.6 How to get Thumbnails working
The ability to create Thumbnails are only given to the Special Category 'Images'.
Therefore you have to assign this Category to an Extension Group first.
After you have assigned the Special Category 'Images' to one (or more) Extension Groups within the Administration Panel -> Extension Groups Management Screen you have to go to Administration Panel -> Special Categories.
Enable the Option to Create Thumbnails. Additionally, set the Image Link Dimensions to 0x0 if you don't want to present Links to your Image if they are greater than the defined size you have entered there.
The last Step is to Test the Thumbnail Settings. The Test Process will create the necessary Directory too.
You should also search for the ImageMagick program if you are unable to recall the correct path to the program.
Please make sure the path to imagemagick does not contain Spaces. (for example 'program files' <- there is a space within the directory name, this will not work)
If you do not see the Options for Thumbnails the Attachment Mod detected that you are not able to create Thumbnails, therefore it was disabled.
粗體的這段是說,絕對不能有空格,不然無法工作。
應該就是這個問題吧。
------------------------------------------------------------
對不起\r
以上的回答應該只是基本設定
正確的解答是\r
因為convert.exe這個檔是在命令列模式下工作
而你的網路使用者並沒有使用這個檔案的權利....
所以就會傳回錯誤的報告
解決的方法有兩種:
第一種:把CMD.EXE (在\WINDOWS\SYSTEM32)的權限開放給網路使用者
第二種:從WINDOWS下複製一個CMD.EXE到你的PHP的安裝目錄下(我就是用這個方法)
這樣應該可以解決你的問題
7.6 How to get Thumbnails working
The ability to create Thumbnails are only given to the Special Category 'Images'.
Therefore you have to assign this Category to an Extension Group first.
After you have assigned the Special Category 'Images' to one (or more) Extension Groups within the Administration Panel -> Extension Groups Management Screen you have to go to Administration Panel -> Special Categories.
Enable the Option to Create Thumbnails. Additionally, set the Image Link Dimensions to 0x0 if you don't want to present Links to your Image if they are greater than the defined size you have entered there.
The last Step is to Test the Thumbnail Settings. The Test Process will create the necessary Directory too.
You should also search for the ImageMagick program if you are unable to recall the correct path to the program.
Please make sure the path to imagemagick does not contain Spaces. (for example 'program files' <- there is a space within the directory name, this will not work)
If you do not see the Options for Thumbnails the Attachment Mod detected that you are not able to create Thumbnails, therefore it was disabled.
粗體的這段是說,絕對不能有空格,不然無法工作。
應該就是這個問題吧。
------------------------------------------------------------
對不起\r
以上的回答應該只是基本設定
正確的解答是\r
因為convert.exe這個檔是在命令列模式下工作
而你的網路使用者並沒有使用這個檔案的權利....
所以就會傳回錯誤的報告
解決的方法有兩種:
第一種:把CMD.EXE (在\WINDOWS\SYSTEM32)的權限開放給網路使用者
第二種:從WINDOWS下複製一個CMD.EXE到你的PHP的安裝目錄下(我就是用這個方法)
這樣應該可以解決你的問題