imagick doesn't seem to work, but it is installed correctly accordingly to phpinfo().
I'm a total newbee with linux, locally I have installed imagick correctly in Xamp, but the installation on my VPS (CentOS5) already took me more than 8 hours and it still doesn't work.. I hope it helps someone later on if I describe a lot, else I would not be so elaborate.. The problem I still have you can read at the end.
First I had to install PEAR, because PECL was not a valid command. the default centOS is compiled --without-pear it seems.
Installation instruction PEAR from: http://pear.php.net/manual/en/installation.getting.php
SSH:
Entered through the defaults..lynx -source http://pear.php.net/go-pear | php
note: got some warning about the tmp_dir
Checking if PEAR works from: http://pear.php.net/manual/en/installation.checking.php
1. First, check where PEAR installs .php files:
/root/pear/pear config-get php_dir
2. Now it's time to find which configuration file is used by your PHP installation. On command line, execute:
doesnt output anything ( ignoring this step...)php --ini
<?php phpinfo(); ?> output: Configuration File (php.ini) Path /etc/php.ini
3. Now check PHP's include_path setting on command line:
.:/root/pearphp -c /path/to/php.ini -r 'echo get_include_path()."\n";'
<?php phpinfo(); ?> output: include_path .:/root/PEAR: .:/root/PEAR:
Ok, I got PEAR, now installing imagick
Note: I installed image magick in the power panel, by adding the package, but I guess that was not needed.
ERROR: phpize not recognised as command.pecl download imagick
pecl install imagick
installed phpize (found help, forgot the page):
ERROR: no acceptable C compiler found in $PATHyum install php-devel
gcc package installed in powerpanel (help found on http://www.linuxquestions.org/questions ... e.-237970/)
ERROR: magickwand configuration error
found another installation guide at http://support.netrack.hu/index.php?_m= ... =9&nav=0,3
After adding “extension=imagick.so the etc/php.ini restart httpdInstall Imagemagick / Imagick for PHP on CentOS Cpanel/Plesk
Solution : For installing Imagick extension for PHP you have to install ImageMagick from source and Its a Must. Otherwise the extension for PHP wont compile.
*# wget ftp://ftp.imagemagick.org/pub/ImageMagi ... ick.tar.gz*
# tar zxf ImageMagick.tar.gz
# cd ImageMagick-x.x.x (For me that was ImageMagick-6.4.2)
# ./configure
# make
# make install
Now download the Imagick extension source from http://pecl.php.net/package/imagick
*# wget http://pecl.php.net/get/imagick-x.x.x.tgz* (For me that was imagick-2.2.0.tgz)
# tar zxf imagick-x.x.x.tgz
# cd imagick-x.x.x.tgz
# phpize && ./configure
*** if you get an error which looks like this:
============================
checking for PHP includes… -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
checking for PHP extension directory… /usr/lib64/php/modules
checking for PHP installed headers prefix… /usr/include/php
checking for re2c… no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk… gawk
checking whether to enable the magickwand extension… no
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
============================
Solution : Install ImageMagick-devel package using “yum install ImageMagick-devel” and then continue (didnt need to do this)
# make
# make install
This will make compile imagick source and build imagick.so - In my machine, I found imagick.so in the following directory
Installing shared extensions: /path/to/php/modules/ (for me this was /usr/lib/php/modules)
# Now add “extension=imagick.so” in your php.ini (You may need to write the full path of imagick.so based on your configuration)
# Restart your web server and thats it (You should see the Imagick extension section in phpinfo page )
----------------------
/usr/local/psa/admin/bin/websrvmng --reconfigure-all
service httpd restart
- Jippie! I see the Imagick extension section in phpinfo() page (see: http://riquard.nl/imagick/phpinfo.php)
but the examples that do work locally in Xamp don't work on the server..
I tried this script: http://valokuva.org/?p=93
and my apache error_log gives me a lot of these:
and the webbrowser: keeps loading, nothing happens,httpd: delegate library support not built-in `/usr/share/fonts/default/Type1/n019003l.pfb' (Freetype).
another example I tried was the "showing a thumbnail" example of image.jpg (http://nl2.php.net/manual/en/imagick.examples.php)
I put that one here: (http://riquard.nl/imagick/index.php), that doesn't give any log entries in the error_log and the webbrowser gives me just the location of the php file.
any help would be very much apreciated, thanks