Need detailed step to enable Imagemagick + PHP

cevo

Active Member
#1
I have successfully build PHP 5.5.3 , but now I need to enable ImageMagick with my PHP. Does anyone got a tutorial ? Thank you in advanced.
 
#4
the main document is here:
http://www.php.net/manual/en/imagick.installation.php

need build imagick.so

refer
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:opcode_cache
for how to build apc.so

it's same steps to build imagick.so
Please see the link you provided and note that there are no steps on how to build any *.so file.

Can you please document this and/or point me to the proper location on how to copy/build/move the imagick.so file into my active litespeed php directory? I've installed image magick and added the extension into my php.ini file...but now I'm stuck at where to locate & copy or build or create the imagick.so file and place it into my proper LSWS extensions directory.

Please advise and thanks in advance.
 
#5
the main document is here:
http://www.php.net/manual/en/imagick.installation.php

need build imagick.so

refer
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:opcode_cache
for how to build apc.so

it's same steps to build imagick.so
Update...I THINK I've found the link to what you were originally referring to back in 2013...it must have changed since then: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apc

Can you please confirm that is the proper link and instructions? If you could provide a specific on imagemagic that'd be very helpful to myself and your other/future customers I'd think. Thanks once more.
 
#6
Using the APC instructions to make the imagik.so file I'm completely at a loss...

Here's your instructions...."go through the regular imagemagick setup and then follow the APC instructions to create the *.so file:...


=================================================
Install APC 3.0.11+ through command line
You can also compile/install for Linux, OS X, FreeBSD, Solaris, etc.

APC is a very mature opcode-caching module, aka “php accelerator”, and strongly maintained athttp://pecl.php.net/apc. We highly recommend APC for anyone using php scripts.

1) Install PHP 4/5 with LSAPI
Install PHP 4/5 with LSAPI

2) Download/Expand APC 3.0.11+
Download and extract source from http://pecl.php.net/package/APC.

Make sure version 3.0.11 or higher is used. Starting with 3.0.11, --enable-apc will imply --enable-apc-mmap.

In APC source directory do:

/php5install/php5/bin/phpize
./configure --enable-apc --with-php-config=/php5install/php5/bin/php-config
make
make install
3) Configure /lswsinstall/conf/php.ini
extension=apc.so
include_path = ".:/php5install/php5"
;extension_dir = ./
=================================================

Okay well I followed the ImageMagick install instructions here (also pasted below so we're on the same page): http://www.php.net/manual/en/imagick.installation.php

=================================================
ImageMagick Install Instructions from php.net....
First of all download a tar image of the ImageMagick install from here:
sourceforge.net/projects/imagemagick/files/

Unpack it and then from terminal issue the following commands in
quotes:
1. "cd ImageMagick-6.5.7" - go where you placed the folder

2. "./configure"

3. "make"

If ImageMagick configured and compiled without complaint, you are
ready to install it on your system. Administrator privileges are
required to install. To install, type the following command in terminal:

1. "sudo make install"

To check your ImageMagick installation enter the following command
in terminal:

1. "make check"

Remember all commands are entered into terminal in the directory in
which you unzipped your downloaded ImageMagick tar file. (the latest
version of which at this time of writing is ImageMagick-6.5.7.)

Next we need to install Imagick.so which is what we want for PHP.

First of all we need to get the right file and we can get that from here:

pecl.php.net/package/imagick/download

At current writing the latest stable version is imagick-2.3.0.

Unpack the tar file and then enter the commands in quotes in terminal:

1. "cd imagick-2.2.3" - go where you placed the folder

2. "phpize"

3. "./configure --with-imagick=/opt/local"

4. "make"

5. "make install"

If you look at the bottom of the output, it will tell you where it has
placed the imagick.so module. For me it was placed in:

/imagick-2.3.0/modules

which is where i had unpacked the downloaded imagick-2.3.0 file.

Then copy it into your MAMP PHP extensions folder.

For me it was:
/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts
-20050922/

Then, for PHP to honor the the extension, add the following line to the
extensions section of your php.ini file:

extension=imagick.so

You should now have a working imagick extension with all of the
resources for php found here:
php.net/manual/en/book.imagick.php
===========================================================

First off, where should I download the ImageMagick install? Anywhere on my server? Or into my LSWS php path?

At what point in time am I supposed to create an imagick.so file that goes into my lsphp5x folder? These lines take from Litespeeds instructions for the APC install make zero sense to me:

/php5install/php5/bin/phpize
./configure --enable-apc --with-php-config=/php5install/php5/bin/php-config
make
make install

3) Configure /lswsinstall/conf/php.ini


What is /php5install/php5? The LSWS php directory? Or the default servers' PHP install directory? What is Configure /lswsinstall/conf/php.ini? I dont have a CONF/php.ini folder or file in my LSWS install directory.

Some specific instructions on how to properly install imagemagick would make a lot more sense to me please and thanks.

I
might be really dumb, because I'm trying to make sense of this and after 2 hours I'm not getting anywhere other than instaling ImageMagick the "normal" way onto my server and not getting the imagick.so file created properly within the LSWS PHP directory...when I run the normal 'phpize' (no LSWS php path chosen) against the imagemagick installer...it creates the *.SO file in my LSWS PHP path...however when i try to test imagemagick its telling me that my build numbers are off...

Also: After following the instructions to install PHP5.6 within Litespeed...when I try to run phpize on Imagemagick, I get the following error...How do I install the phpize and build tools into the Litespeed 5.6 PHP installation?

[root@srv imagick-3.3.0]#
/usr/local/lsws/lsphp56/bin/phpize
Cannot find build files at '/usr/local/lsws/lsphp56/lib64/php/build'. Please check your PHP installation.


Plz help! Thnx again!
 
Last edited:
Top