MG 1.1 Can't Save Media - Server Errors

51463

Well-known member
I've started getting some server errors lately. After i upload media and the press "Save"

I get this message:

"The following error occurred:
A server error occurred. Please try again later."

The media doesn't save and i get this in the error messages.

Code:
ImagickException: NoDecodeDelegateForThisImageFormat `/home/website/public_html/internal_data/attachments/4/4351-1ec069b76f95378f575a73ab9264adfd.data' @ constitute.c/ReadImage/503 - library/XenGallery/Helper/Image.php:468
Generated By: mr.photograph , A moment ago
Stack Trace

#0 /home/website/public_html/library/XenGallery/Helper/Image.php(468): Imagick->__construct('/home/website...')
#1 /home/website/public_html/library/XenGallery/Helper/Image.php(429): XenGallery_Helper_Image->writeWatermarkIm('100', '5', '5', 'r', 'b')
#2 /home/website/public_html/library/XenGallery/Model/Watermark.php(189): XenGallery_Helper_Image->writeWatermark('100', '5', '5', 'r', 'b')
#3 /home/website/public_html/library/XenGallery/ControllerPublic/Media.php(3076): XenGallery_Model_Watermark->addWatermarkToImage(Array)
#4 /home/website/public_html/library/XenGallery/ControllerPublic/Media.php(2845): XenGallery_ControllerPublic_Media->_associateAttachmentsAndMedia(Array, Array, Array)
#5 /home/website/public_html/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_Media->actionSaveMedia()
#6 /home/website/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/website/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}

Request State

array(3) {
  ["url"] => string(37) "[URL]http://website.com/media/save-media[/URL]"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(14) {
    ["type"] => string(5) "album"
    ["album_id"] => string(39) "130.the coolest cars"
    ["image_upload_type"] => string(6) "upload"
    ["image_upload"] => array(1) {
      [4356] => array(6) {
        ["media_title"] => string(47) "the coolest cars (137)"
        ["media_description"] => string(0) ""
        ["tags"] => string(0) ""
        ["media_tag"] => string(0) ""
        ["media_embed_url_original"] => string(0) ""
        ["media_embed_url"] => string(0) ""
      }
    }
    ["media_image_upload"] => string(4) "true"
    ["media_"] => string(4) "true"
    ["image_upload_hash"] => string(32) "300bbe29c4788b11ce1a8e45e3509450"
    ["container_type"] => string(5) "album"
    ["container_id"] => string(3) "126"
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(23) "/media/add?album_id=126"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}


What could possibily be causing this. I haven't changed anything lately.

If i disable watermarks it saves with no problem, but if i enable it, it won't save.


thanks,


.
.
 
Last edited:
It seems to be an issue with ImageMagick and the watermarking process.

It's not actually an error I've seen before - are you able to provide a link to the image that caused this? Maybe getting the uploader to send it to you directly?

The error suggests that it is unable to decode the file that is uploaded. This might suggest that it is something we don't consider to be a valid image. For example, if a PDF was uploaded and we tried to watermark it, that could cause this error, I guess.

I've also seen suggestions about things such as the Imagick binary being no longer executable, e.g. chmodding it to 755 may help but that seems a weird thing to change (unless you've specifically been doing anything on the server side regarding the file system).

Finally, we have occasionally seen Imagick fail spectacularly between versions. It may be worth either upgrading or downgrading to a different Image Magick version to see if the issue goes away.
 
Unfortunately, I am not able to provide a link to the image that caused this, as the image is saved on my computer and i forget where i got it from.

But i even tried with different types of photos: png and jpg and i get the same error.

I even tried with the default windows pictures

Capture.webp

And same problem.

1. I will try to see if the ImageMagick folder is still Chmodding to 755,


2. I will see if i can upgrade my ImageMagick, if i am capable of

for now, i'll just turn watermarks off
 
Last edited:
Not sure if this is related, but I seem to be getting a very similar error all of a sudden. Watermarking was working fine before upgrade to 1.0.9. Image that the user was getting the error with is attached.

Code:
Exception: Cannot watermark without ImageMagick installed. - library/XenGallery/Helper/Image.php:426
Generated By: Member, 4 minutes ago
Stack Trace
#0 /home/website/public_html/library/XenGallery/Model/Watermark.php(189): XenGallery_Helper_Image->writeWatermark('80', '5', '5', 'l', 'b')
#1  /home/website/public_html/library/XenGallery/DataWriter/Media.php(381): XenGallery_Model_Watermark->addWatermarkToImage(Array)
#2 /home/website/public_html/library/XenForo/DataWriter.php(1409): XenGallery_DataWriter_Media->_postSave()
#3 /home/website/public_html//library/XenGallery/Model/Media.php(2788): XenForo_DataWriter->save()
#4 /home/website/public_html/library/XenGallery/ControllerPublic/Media.php(2818): XenGallery_Model_Media->associateAttachmentsAndMedia(Array, Array, Array, 'category')
#5 /home/website/public_html//library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_Media->actionSaveMedia()
#6 /home/website/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/website/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
["url"] => string(41) "http://website.com/media/save-media"
["_GET"] => array(0) {
}
["_POST"] => array(20) {
["type"] => string(8) "category"
["category_id"] => string(1) "9"
["image_url"] => string(0) ""
["media_title_all"] => string(0) ""
["media_description_all"] => string(0) ""
["media_title"] => array(1) {
["image_upload"] => array(1) {
[512] => string(14) "Celtic Crosses"
}
}
["media_description"] => array(1) {
["image_upload"] => array(1) {
[512] => string(0) ""
}
}
["media_tag"] => array(1) {
["image_upload"] => array(1) {
[0] => string(0) ""
}
}
["media_embed_url_original"] => array(1) {
["image_upload"] => array(1) {
[0] => string(0) ""
}
}
["media_embed_url"] => array(1) {
["image_upload"] => array(1) {
[0] => string(0) ""
}
}
["media_image_upload"] => string(4) "true"
["image_upload_hash"] => string(32) "ba94236ecc9f32b93e5a45c37ff7a2c0"
["embed_url"] => string(0) ""
["container_type"] => string(8) "category"
["container_id"] => string(1) "9"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(10) "/media/add"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 

Attachments

  • celticcrossesresized-png.511.webp
    celticcrossesresized-png.511.webp
    146.2 KB · Views: 12
I haven't gotten around to upgrading my imagemagick, but

After i upgrading to the newest xfmg today i noticed that i am unable to click on the radio button "Watermark Enabled"

Capture.webp


I wonder why it suddenly stopped working, or maybe the latest newest versions needs a new version of imagemagick,

i will upgrade today or maybe reinstall, strange..
 
On a side note, upgrading image magick didn't seem to fix the "unable to click 'enable watermark' problem". That was fixed when they upgraded the imagick pecl extension. (Or something like that ;) )
 
Indeed.

Generally speaking imagick refers to the name of the PHP extension, whereas ImageMagick is the full name for the binaries required for the extension to work. That said, the terms are used rather interchangeably :)
 
It's fixed.

I updated my Imagemagick(using putty) and imagick extension.(inside whm)

and it still wouldn't work, i couldn't click on the radio button.

Then i restarted my apache and i was able to click it.


I was messing around in putty for an hour when i found out that you can easily install imagick inside WHM.

WHM -> Software -> Module Installers -> PHP Pecl (manage). -> “Install a PHP Pecl” enter “imagick” and click “Install Now” button

Capture.webp

I wish i knew that!


Also, i should've restarted apache before reinstalling/updating Imagemagick and imagick extension.

Maybe something as simple as that would've fixed it and no need to update it.


Anyways, its fixed and i learned alot from this.


thanks!
 
Back
Top Bottom