installing imagick php extension

mikeschroeder

New member
Joined
Jun 8, 2008
Messages
1
I'm trying to install the imagick php extension (http://us3.php.net/imagick)

I've tried both of these methods in the INSTALL file.

Installing from sources

1. Install ImageMagick libraries (at least version 6.2.4)
2. Unpack imagick source package
3. Go to imagick folder and type "phpize && ./configure && make && make install"
4. Make sure you have extension=imagick.so in your php.ini


Compiling Imagick into PHP

1. Install ImageMagick libraries (at least version 6.2.4)
2. Unpack imagick source package to $PHP_SOURCE_DIR/ext/imagick
3. In php source root directory run commands: "rm configure && ./buildconf --force"
4. Configure PHP with command "./configure --with-imagick"
5. Run make && make install

The first option results in no warnings or any trouble with restarting apache but the imagick extension does not appear in my phpinfo() file.

When i run ./build php n
I get this warning:
Notice: Following unknown configure options were used:

--with-imagick

right before it finishes configuring the build and then begins the making php.

Anyone have any suggestions?
 
Hi,

Have you succeeded?
I also want to use the ImageMagick module for php5 on my DirectAdmin install (Debian Etch).
But before i do anything i want to know the right way.

I have this in mind:

Code:
apt-get install imagemagick
pecl install imagick
cp imagick.so /usr/local/lib
echo "extension=imagick.so" >> php.ini
/etc/init.d/httpd restart

Can someone tell us the right way?
Thank you!
 
I've just installed imagick without MagickWand

I followed the instructions but still it failed.

Eventually I discovered that the problem was the line in the php.ini that reads
extension_dir = "./"
that prevents PHP from looking for extensions in the default location
if you comment out that line using a semi-colon everything should work as expected!
 
Last edited:
The correct way, assumes running as root. Tested on CentOS 5.2 64bit (note: for 32bit users change the lib64 to lib). Also it is assumed that you have the extension_dir set correctly (/usr/lib64/php/modules). The default will be something like /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/ if you check your phpinfo(). Change it to a sensible place.

Code:
wget http://pecl.php.net/get/imagick-2.3.0.tgz
tar -zxf imagick-2.3.0.tgz
cd imagick-2.3.0
phpize
locate imagick.so | rm -rf /usr/lib64/php/modules/imagick.so
./configure —with-imagick=/usr/local
make
make install
mv /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/imagick.so /usr/lib64/php/modules/
vi /usr/local/directadmin/custombuild/configure/ap2/configure.php5 add line —with-imagick=/usr/local
/usr/local/directadmin/custombuild/build php n
 
Back
Top