cakephp和imagick - 原始文件不会上传

时间:2011-08-17 22:35:52

标签: php cakephp imagick

当我上传JPEG时,一切正常。但是,上传RAW时它确实有效。我将php.ini上传限制设置为25M。我能够上传7MB JPEG文件而不是7MB RAW文件。以下是我收到的错误:

[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: PHP Fatal error:  Uncaught exception 'ImagickException' with message 'Can not process empty wand' in /home/photobound/public_html/plugins/photo_bank/models/photo_bank_image.php:264, referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: Stack trace:, referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #0 /home/photobound/public_html/plugins/photo_bank/models/photo_bank_image.php(264): Imagick->getimagewidth(), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #1 /home/photobound/public_html/plugins/photo_bank/models/photo_bank_image.php(124): PhotoBankImage->computeImageFieldsForSave(), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #2 /usr/share/php/cake/cakephp/cake/libs/model/model.php(1282): PhotoBankImage->beforeSave(Array), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #3 /home/photobound/public_html/plugins/photo_bank/controllers/photo_bank_images_controller.php(131): Model->save(Array), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #4 [internal function]: PhotoBankImagesController->upload('-1'), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #5 /usr/share/php/cake/cakephp/cake/dispatcher.php(204): call_user_func_array(Array, Array), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #6 /usr/share/php/cake/cakephp/cake/dispatcher.php(171): Dispatcher->_invoke(Object(PhotoBankImagesController), Array), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #7 /home/photobound/public_html/webroot/index.php(84): Dispatcher->dispatch(), referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr: #8 {main}, referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf
[Wed Aug 17 17:23:55 2011] [warn] [client 192.168.1.6] mod_fcgid: stderr:   thrown in /home/photobound/public_html/plugins/photo_bank/models/photo_bank_image.php on line 264, referer: http://photobound.local/photo_bank/js/plupload/plupload.flash.swf

以下是第264行的代码:

$this->data['PhotoBankImage']['width'] = $this->image->getImageWidth();

以下是我认为相关的php.ini设置:

post_max_size = 25M
post_max_size = 25M
memory_limit = 512M
max_execution_time = 120
max_input_time = 120

我很感激您的帮助,如果您需要我的任何其他信息以便了解问题,请与我联系。

1 个答案:

答案 0 :(得分:0)

RAW文件不是标准图像。标准图形库无法使用它们。格式因相机品牌/型号等而异。