Jump to content
The Uniform Server Community
Luke Wolf

How to install the ImageMagick extension with Uniform Server ZeroXI (WAMP))

Recommended Posts

I searched online for an hour to no avail and then spent a couple of hours figuring out how to install the ImageMagick extension on a Windows system with Uniform Server ZeroXI. The following may save some time and frustration for others wanting to use this utility with their local PHP site. I'm using it for local WordPress development.

 

In this case, the installation is on a Windows 7 (64-bit) box.
However, in this example, the 32-bit version is installed for testing.

For the installation steps below, PHP 5.5 has been installed.
Use the provided note (minor change) for other versions of PHP.


Optional Windows Stand-alone installation:

1. The stand-alone version of ImageMagick for Windows is here:
http://www.imagemagick.org/script/binary-releases.php#windows
2. Download/install either:
ImageMagick-6.8.9-5-Q8-x64-dll.exe or ImageMagick-6.8.9-5-Q16-x86-dll.exe.
3. Be sure to click on the "Add to system path" checkbox.
4. Test/use the application from start menu application or the desktop icon.
5. Command line examples are here:
http://www.imagemagick.org/Usage/


Uniform Server ZeroXI ImageMagick installation:

1. from here:
http://pecl.php.net/package/imagick/3.1.2/windows
2. download:
'5.5 Thread Safe (TS) x86'
3. unzip:
php_imagick-3.1.2-5.5-ts-vc11-x86.zip
4. copy:
CORE_RL_bzlib_.dll
CORE_RL_glib_.dll
CORE_RL_lcms_.dll
CORE_RL_lqr_.dll
CORE_RL_magick_.dll
CORE_RL_ttf_.dll
CORE_RL_wand_.dll
CORE_RL_zlib_.dll

5. to: YOUR_LOCAL_PATH\UniServerZ\core\php55
(use the php54 folder, if you don't have PHP 5.5 intalled)
6. copy:
php_imagick.dll
7. to: YOUR_LOCAL_PATH\UniServerZ\core\php55\extensions
(use the php54 folder, if you don't have PHP 5.5 intalled)
8. with the UniController, Stop Apache
9. from the UniController menu, choose: PHP -> Edit selected configuration file
10. locate the 'Dynamic Extensions' section
11. insert (on a line by itself and press Enter):
extension=php_imagick.dll
12. save and close the configuration file
13. with the UniController, Start Apache
14. the PHP ImageMagick manual is here:
http://www.php.net/manual/en/book.imagick.php
15. verify successful implementation with phpinfo(), search for 'imagick module'
(from the UniController menu, choose: PHP -> View phpInfo)
16. or, verify with the following PHP function:

function get_imagick_version()
{
    // the API version number will be returned (currently 6.8.8), or 0 on failure
    // the module version number is a different value (currently 3.1.2)

    $imagick_v = 0;

    if (extension_loaded('imagick') && class_exists('Imagick'))
    {
        $imagick = new Imagick();
        $imagick_info = $imagick->getVersion();

        $imagick_vs = $imagick_info['versionString'];
        preg_match('/ImageMagick ([\d]*\.[\d]*\.[\d]*)/', $imagick_vs, $imagick_vs_return);
        $imagick_v = $imagick_vs_return[1];
    }

    return $imagick_v;
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...