ImageMagick on Ubuntu 14.04 No Decoding Delegate

It works in the development environment, but not in the production environment.

Environmental error during production:

$e->getMessage(): "no decode delegate for this image format '/tmp/sws5725c638311df5.24370631' @ error/svg.c/ReadSVGImage/2871" 

Create tmpname:

 $tmpname = '/tmp/'.uniqid('sws', true); 

Method:

 public function load($filename) { try { $this->filename = $filename; $this->image = new Imagick($filename); return $this; } catch(ImagickException $e) { error_log($e->getMessage(), 3, "/tmp/log.log"); OPException::raise(new OPInvalidImageException('Could not create jpeg with ImageMagick library')); } } 

Delegates:

 convert -list configure | grep DELEGATES bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib 

Versions (dev and prod enviroments):

  • ImageMagick 6.7.7-10
  • Ubuntu 14.04
  • PHP 5.5.9-1ubuntu4.16

Any suggestions? Thanks for attention.

0
source share
1 answer

Temporary file

When viewing a temporary file using the vim command, I received an error message coming from the server in XML format, and therefore the imagic library treated it as an svg file.

 vim /tmp/sws5725c638311df5.24370631 <?xml version="1.0" encoding="UTF-8"?> <Error> <Code>RequestTimeTooSkewed</Code> <Message>The difference between the request time and the current time is too large.</Message> <RequestTime>Sun, 01 May 2016 06:43:17 GMT</RequestTime> <ServerTime>2016-05-01T06:28:06Z</ServerTime> <MaxAllowedSkewMilliseconds>900000</MaxAllowedSkewMilliseconds> <RequestId>382A337F3660C5A9</RequestId> <HostId>+2RI3xW5KBd64P13x4yaWly6VdZzn1okvMAYgKvbFYlGnLp87udxpSBCVx7iQNk7zgnkK/ckUXA=</HostId> </Error> 

Decision

Synchronize the operating system time with server time.

 sudo service ntp stop sudo ntpdate ntp.ubuntu.com sudo service ntp start 

Thanks for the comments.

0
source

Source: https://habr.com/ru/post/1204310/


All Articles