[PHP] error/blob.c/OpenBlob/2641
Posted: 2017-07-18T17:29:26-07:00
Hello,
I have been Googling for the past two days trying to figure this issue out, but to little effect.
I am using Imagemagick within PHP, with the following code:
When I was running this on a Server with PHP 5.6, this worked no problem. PDFs (with [0] instead of [60]), MP4s, M4Vs, AVIs, JPGs and PNGs worked with the code above. No problem.
But after I moved my code from a dev server to the live server (this is what I get for having environments that are out of sync!), I started getting this error:
Further debugging reveals that "readImage" is the problem. If that function is passed a path to a video file, it will error out.
The first thing I thought was "permissions" - but the permissions for /tmp are 777.
Everything I have read concerning this error has to do with permissions, or the "convert" command - but as this is run through PHP, I am not sure what exactly goes on between PHP and Imagemagick.
Here are current versions for both.
I have been Googling
Code: Select all
error/blob.c/OpenBlob/2641
I am using Imagemagick within PHP, with the following code:
Code: Select all
$imagick = new Imagick();
$imagick->readImage("/path/to/file.mp4[60]");
$imagick->setImageFormat('jpg');
$imagick->scaleImage(400,0);
$imagick = $imagick->flattenImages();
$save = $imagick->writeImage("/save/here/image.jpg");
But after I moved my code from a dev server to the live server (this is what I get for having environments that are out of sync!), I started getting this error:
Code: Select all
unable to open image '/tmp/magick-1FmHq1zi.pam': No such file or directory @ error/blob.c/OpenBlob/2641
The first thing I thought was "permissions" - but the permissions for /tmp are 777.
Everything I have read concerning this error has to do with permissions, or the "convert" command - but as this is run through PHP, I am not sure what exactly goes on between PHP and Imagemagick.
Here are current versions for both.