Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Imagick/imagemagick PHP extension on windows 7

How to install image magic in Windows 7. I followed these instruction

To install IMagick on Windows XP (php 5.2.x)

  1. download and install ImageMagick-6.5.8-7 Q16-windows-dll.exe http://www.imagemagick.org/download/binaries/ ImageMagick-6.5.8-7-Q16-windows-dll.exe

  2. download php_imagick_dyn-Q16.dll from: http://valokuva.org/outside-blog-content/ imagick-windows-builds/080709/

    copy dll to [PHP]/extension dir and rename it to php_imagick.dll

  3. You have to edit your php.ini file and add new extension

    extension=php_imagick.dll 
  4. Save ini file and restart apache server.

    (If necessary, restart your windows)

  5. phpinfo() should show imagick enabled.

after that I execute a sample script but its not working. It shows the Imagic class missing error.

Fatal error: Class 'Imagick' not found in C:...\imgborder.php on line XXX

Please help me to install Imagick. :-(

like image 930
DEVOPS Avatar asked Jun 14 '10 11:06

DEVOPS


People also ask

How do I enable imagick extension in PHP?

To enable Imagick for your website, go to your Site Tools -> Dev -> PHP Manager. Click the PHP Extensions tab and find the entry for the “imagick” extension in the list that appears. Then click the Change value button (pencil icon), select the On radio button for Status and save the changes.

How do I install imagick library?

To install it, download Visual C++ Redistributable Package. Congratulations, you have a working ImageMagick distribution under Windows and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.


1 Answers

Check permissions on the .dll file to make sure the Apache user has read access to the file. Better change the permission of the [PHP]/extension directory.

To change the permission

  1. Right click the file(s) or folder(s)
  2. Select "Properties"
  3. Select "Security" tab
  4. Click on "Edit" button.

Change the permission of user to Full Control.

like image 188
chanchal1987 Avatar answered Sep 28 '22 17:09

chanchal1987