ImageMagick Brew installation with PHP Module in Mac OS X

2022-08-30 13:12:15

I have installed ImageMagick using . This all worked fine and I can run any ImageMagick command from the Terminal / Command line.brew install imagemagick

Now when I try to use the ImageMagick classes in PHP, I get an error . I guess this is because the ImageMagick module is not loaded.Class 'Imagick' not found in ...

Could anyone help me to get this thing working in PHP? Thanks!

Additional info:
Mac OS X Version: 10.8: Mountain Lion
PHP Version: 5.3.13


答案 1

I just did this after a lot of experimenting. For now, this seems to be the way to do it for php 5.3:

brew tap josegonzalez/php
brew tap homebrew/dupes
brew install php53-imagick

No idea who Jose Gonzalez is but apparently we are in his debt....


答案 2

php72-imagick is now deprecated as imagick is part of php binary itself. Use to install imagick e.g.:pecl

brew install php
brew install imagemagick
brew install pkg-config
pecl install imagick

推荐