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 »

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: 25562
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 »

$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 »

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: 25562
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 »

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 »

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 »

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: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Strange error with php56-imagick on MacOS

Post by dlemstra »

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 »

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: 25562
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 »

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 »

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