Strange error with php56-imagick on MacOS

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
bezdoom
Posts: 5
Joined: 2015-10-28T07:59:07-07:00
Authentication code: 1151

Strange error with php56-imagick on MacOS

Post by bezdoom » 2015-10-28T08:01:40-07:00

Hey guys!
I have strange problem with IMagick on my mac.

Detail of this problem here
http://stackoverflow.com/questions/3337 ... 56-imagick

Please help!

User avatar
fmw42
Posts: 25404
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Strange error with php56-imagick on MacOS

Post by fmw42 » 2015-10-28T09:29:02-07:00

$imagick = new \Imagick();
I am not an IMagick expert, but I do not think there should be a \ in that command.

bezdoom
Posts: 5
Joined: 2015-10-28T07:59:07-07:00
Authentication code: 1151

Re: Strange error with php56-imagick on MacOS

Post by bezdoom » 2015-10-29T02:11:57-07:00

fmw42 wrote:
$imagick = new \Imagick();
I am not an IMagick expert, but I do not think there should be a \ in that command.
\ mean the root namespace.

User avatar
fmw42
Posts: 25404
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Strange error with php56-imagick on MacOS

Post by fmw42 » 2015-10-29T14:30:35-07:00

I believe the syntax is more like

Code: Select all

$img = new imagick('/Users/vkulikov/Downloads/1444827520-120x60.gif');
There should be no \

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Strange error with php56-imagick on MacOS

Post by Bonzo » 2015-10-29T15:20:04-07:00

Removing the \ from the front of imagick sounds right to me fmw42.

You are also calling your file from outside your local host. I would either try reading an image from the web or reading one from the same folder that run.php is in.

bezdoom
Posts: 5
Joined: 2015-10-28T07:59:07-07:00
Authentication code: 1151

Re: Strange error with php56-imagick on MacOS

Post by bezdoom » 2015-10-30T01:28:21-07:00

Guys, problem not in \.

Problem somewhere in C++ plugin MagickWand

Code: Select all

$ php run.php 

Assertion failed: (wand->signature == WandSignature), function MagickClearException, file wand/magick-wand.c, line 246.
Magick: abort due to signal 6 (SIGABRT) "Abort"...
Abort trap: 6

User avatar
dlemstra
Posts: 1567
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Strange error with php56-imagick on MacOS

Post by dlemstra » 2015-10-30T02:50:26-07:00

It looks like you are using different versions of ImageMagick at the same time. Did you install multiple versions of ImageMagick?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

bezdoom
Posts: 5
Joined: 2015-10-28T07:59:07-07:00
Authentication code: 1151

Re: Strange error with php56-imagick on MacOS

Post by bezdoom » 2015-10-30T05:52:49-07:00

dlemstra wrote:It looks like you are using different versions of ImageMagick at the same time. Did you install multiple versions of ImageMagick?
i've installed imagick with homebrew

Code: Select all

$ brew install imagemagick
How can i check this case?

My current versions

Code: Select all

$ identify -version

Version: ImageMagick 6.9.2-4 Q16 x86_64 2015-10-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules 
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib

Code: Select all

$ php -i | grep imagick

imagick
imagick module => enabled
imagick module version => 3.1.2
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0

User avatar
fmw42
Posts: 25404
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Strange error with php56-imagick on MacOS

Post by fmw42 » 2015-10-30T09:51:17-07:00

try

type -a convert

or

which -a convert

bezdoom
Posts: 5
Joined: 2015-10-28T07:59:07-07:00
Authentication code: 1151

Re: Strange error with php56-imagick on MacOS

Post by bezdoom » 2015-10-30T12:43:11-07:00

fmw42 wrote:try

type -a convert

or

which -a convert

Code: Select all

$ type -a convert
convert is /usr/local/bin/convert

Code: Select all

$ which -a convert
/usr/local/bin/convert

Post Reply