1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PNG crashes my PHP w/ imagick. Can you give it a try?

Discussion in 'Off Topic' started by AlexT, Jul 11, 2013.

  1. AlexT

    AlexT Well-Known Member

    On my test server I use PHP with imagick (v6.6.0, not the latest I know). While doing some tests with xF, I stumbled over this PNG file that made my PHP-FPM processes crash (SIGABRT). I never had this happen with GD, but since imagick is supposed to generate superior tumbnails, I thought to give it a try...

    Could you try attached PNG and see if it works for you if you use imagick? I may upgrade the test server to run a later version of imagick, but for now I am a bit taken aback how one PNG could crash the whole PHP process.
     

    Attached Files:

  2. p4guru

    p4guru Well-Known Member

    Tried on my Nginx and PHP 5.4 PHP-FPM server with and ImagicK and your image failed. It's the image that is problem. I did a screen capture copy of image and named it failure_new.png and that processed fine in Xenforo

    using ImagicK 3.1.0RC2 php extension and ImagicK 6.5.4.7-6.el6_2
     

    Attached Files:

  3. AlexT

    AlexT Well-Known Member

    Thanks for testing. Yes, it's the image that is crashing imagick, but it really shouldn't do that. Anyone could upload that image and (maliciously) start crashing someone's PHP processes.

    I have been using GD for over ten years, and never did I encounter something like this. It shouldn't crash. If it doesn't like the PNG for whatever reason (GD is OK with it, various image viewers I tried are OK with it), it should send a failure return code. I am too lazy to compile imagick and its PHP extension with debug symbols, but I was still interested if this apparent bug had been fixed in later versions.

    It's too bad. Despite imagick being said to produce superior thumbnail results, I will most likely go back to GD.
     
  4. AlexT

    AlexT Well-Known Member

    Last edited: Jul 12, 2013
  5. p4guru

    p4guru Well-Known Member

    well didn't crash php-fpm for me, just got failed upload error in xenforo
     
  6. AlexT

    AlexT Well-Known Member

    Did you check the PHP FPM logs? It normally respawns new children when the process crashesoso you don't necessarily notice the crash.
     

Share This Page