I would like to know how to download the correct Imagemagick decode delegates from http://www.imagemagick.org/download/delegates/, as well what to do with them afterwards.
I'm using:
Imagick 3.4.3RC1, 6.9.3-7 Q16 x64 2016-03-27
PHP 5.6.25
WAMP 3.0.0.25 on Windows 7
I've been looking on Imagick and Stackoverflow threads, but the ones I found were mostly concerning errors with the delegates after they had them, and none of them used WAMP. Any help would be appreciated
In the past this has worked by installing ImageMagick and then downloading a compatible imagick PHP extension.
But currently there seems to be a temporary "Catch 22" situation with ImageMagick and imagick.
imagick versions need to be compiled against a specific version of ImageMagick and currently that has not been done for imagick against the new ImageMagick 7 although I am informed by #danack that imagick is ready to be compiled but nobody has done so yet, or at least they have not shared the binary.
Unfortunately ImageMagick do not retain older versions of their install i.e. ImageMagick 6.? so if you dont already have a version of the installer the only availaible one is ImageMagick 7
The Catch 22
Therefore the only versions of imagick available will only work with ImageMagick 6 and you cannot download ImageMagick 6 as the ImageMagick people do not retain old version of their installer.
The work around
However, if you only want ImageMagick to work within a PHP/Apache environment this proceedure works.
The versions of the following must match your WAMPServer, so if you installed WAMPServer 32bit use the 32bit versions of ImageMagick and Imagick, if you use WAMPServer 64bit, use the 64bit versions of ImageMagick and Imagick.
The VC14 versions should work with WAMPServers Apache 2.4.x versions
Download ImageMagick-6.9.3-7-vc14-x86.zip (32bit)
or ImageMagick-6.9.3-7-vc14-x64.zip (64bit)
from http://windows.php.net/downloads/pecl/deps/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit
Download php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit)
or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit)
from http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit
Create a folder to hold ImageMagick, I used wamp\imagemagick
Unzip whichever of the ImageMagick's you downloaded i.e.
ImageMagick-6.9.3-7-vc14-x86.zip or ImageMagick-6.9.3-7-vc14-x64.zip into the wamp\imagemagick folder
Unzip whichever of the imagick version you downloaded php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit) or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit) into a temp folder and copy the php_imagick.dll from the temp folder to your wamp\bin\php\php5.6.25\ext folder
Edit your 'php.inifile to add the extension. Use the wampmanager menus so you edit the correct file
(left click) wampmanager->PHP->php.ini
Add the lineextension=php_imagick.dllinto the section ofphp.inithat contains the otherextension` parameters.
Add the folder to your windows PATH using
Control Panel -> System -> Advanced System Setting
Select the Advanced Tab
Click the Environment Variables Button
Add C:\wamp\imagick; to the PATH variable in the System Variables section
[I dont like adding anything to the PATH for WAMPServer, but I cannot think of a better solution for now and as this way will work for multiple versions of PHP it is not actually so bad]
Start WAMPServer, or restart Apache. It may be necessary to reboot windows, it was for me, but maybe that was because I tried a number of things before I got to this solution.
Check with phpinfo() you should see
Related
I've been trying to install php_imagick on wamp64 without any luck.
The desired goal is for WordPress to stop showing the error message:
The optional module, Imagick, is not installed or has been disabled.
You can also skip reading and view the images attached below.
My setup:
Wamp64 Windows 10 Release Version 3.2.3.3 64 Bits [Windows Build: 19041]
PHP Version: 7.4.9
Build Date: Aug 4 2020 11:45:36
Windows: NT *username* 10.0 build 19041 (Windows 10) AMD64
Compiler Visual: C++ 2017
Architecture: x64
Loaded Configuration File: C:\wamp64\bin\apache\apache2.4.46\bin\php.ini
Thread Safety: enabled
I tried installing the following ImageMagick files:
1) ImageMagick-7.0.10-30-Q16-HDRI-x64-dll.exe
----A) php_imagick-3.4.3rc1-5.6-ts-vc11-x64.zip
----B) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
2) ImageMagick-7.0.10-30-Q16-x64-dll.exe
----A) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
----B) php_imagick-3.4.4rc2-7.3-ts-vc15-x64.zip
3) ImageMagick-6.9.3-7-Q16-x64-dll.exe (Current)
----A) php_imagick-3.4.4rc2-7.3-ts-vc15-x64.zip (Current)
----B) php_imagick-3.4.3rc1-7.1-ts-vc14-x64.zip
----C) php_imagick-3.4.3rc1-5.6-ts-vc11-x64.zip
What I did:
I first installed the EXE file and then extracted from the zip file just the php_imagick.dll file into this folder:
C:\wamp64\bin\php\php7.4.9\ext
Which matches my currently used PHP version (see images later for more information[php.ini]).
I tried restarting Wamp, rebuilding symlinks by switching PHP/Apache versions.
Will also be worth mentioning that I at one point tried extracting the full zip into the 'ext' folder under a folder named 'php_imagick' as shown below and did manage to get this error:
C:\wamp64\bin\php\php7.4.9\ext\php_imagick\php_imagick.dll (The specified procedure could not be found.)
but mostly I receive these errors:
[25-Sep-2020 08:58:50 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll' (tried: c:/wamp64/bin/php/php7.4.9/ext/php_imagick.dll (The specified module could not be found.), c:/wamp64/bin/php/php7.4.9/ext/php_php_imagick.dll.dll (The specified module could not be found.)) in Unknown on line 0
When I install Magick using the EXE, I make sure to check the install to the path, Change the folder to C:\ImageMagick, and install the legacy drivers if possible, as suggested on Stack OverFlow.
(I also make sure to uninstall the last version I tried each time)
I have Visual Studio installed and a bunch of redistributables and also both x86 and x64 versions of these:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
http://www.microsoft.com/en-us/download/details.aspx?id=30679
Without any luck, I went ahead and read several Stack OverFlow posts and could not find a solution.
How to install ImageMagick with Wampserver 3.0.0 64?
step-by-step instructions for installing IMAGEMAGICK on WAMP?
Installing php_imagick.dll PHP extension on wampserver 2.2
Unable to install php_imagick.dll on wamp
Imagick delegates installation on WAMP
How to install ImageMagick with Wampserver 3.0.0 64?
step-by-step instructions for installing IMAGEMAGICK on WAMP?
Installing php_imagick.dll PHP extension on wampserver 2.2
Unable to install php_imagick.dll on wamp
Imagick delegates installation on WAMP
WAMP PHP Startup Error: Unable to load dynamic library
Installing ImageMagick extension with php/windows
Linker error when trying to use ImageMagick as static libraries with Visual Studio compiler
Installing Magick++ in Visual C++ 2010
Installing Magick++ in visual studio 2019
ImageMagick with Visual Studio
WampServer and Imagemagick, imagick php module not recogized
Cannot load imagick library
ImageMagick not working
What can I try next?
typo in line 955: .php=.dll
I hired a freelancer to fix this for us.
Uninstall any versions of WampServer and ImageMagick you have installed
Don't forget to backup your database and www folder before you uninstall
We are going to install a trustable software called Chocolatey that will help us fix a bunch of errors with Wamp64 and it's extensions as well as help us update those applications with one command.
For those of you who already fixed this before using Chocolatey and
now seeing this error message again simply update Wamp and ImageMagick
using the choco commands provided on their website and then read my
note under 4) for more information
Run PowerShell as Admin
Follow this guide to Download chocolatey https://chocolatey.org/install
Use the same methods to Download Wamp64 https://chocolatey.org/packages/wamp-server
Run Wamp from the newly created shortcut on your desktop
Change the PHP version to 7.4.9 or the latest and only then move
to the other steps
Don't worry about the fact the folder is named Wamp and not Wamp64. It's still the 64bit version. You can check this in the about section of Wamp
Download https://chocolatey.org/packages/imagemagick
Download https://windows.php.net/downloads/pecl/deps/ImageMagick-7.0.7-11-vc15-x64.zip
Note: If that doesn't work, they probably updated again. Just try the same methods using newer versions then these. I will first try more recent versions of php_imagick instead of replacing the ImageMagick core DLL files. One thing I will not do is give up.
Extract And Copy all CORE_RL and IM_MOD_RL DLL files into C:\wamp\bin\php\php7.4.9 where php.exe is located
(Do not run any EXE file from here as we already installed ImageMagick)
Download https://windows.php.net/downloads/pecl/releases/imagick/3.4.4/php_imagick-3.4.4-7.4-ts-vc15-x64.zip
Extract and Copy just the php_imagick.dll file to C:\wamp\bin\php\php7.4.9\ext
Open your php.ini file by left-clicking Wamp->PHP->php.ini and then make sure you delete all leftovers and add below any extention= line the code below:
extention=imagick
(Apparently, New PHP versions require writing it without the "php_"...".dll" parts)
Restart Wamp by closing it and reopening it from its shortcut
This is by far the only solution I could get running.
choco:
Google = https://www.google.com/search?q=chocolatey
2019 = http://web.archive.org/web/20190101113929/https://chocolatey.org/
2018 = http://web.archive.org/web/20180414000310/https://chocolatey.org/
Enjoy
I use wampserver 3.2.3 64bit together with PHP 7.3.
Copying the CORE_RL and IM_MOD_RL DLLs into the PHP root direcory as orr burgel recommended in item #5 did not work for me.
I had to copy these DLLs into c:\wamp64\bin\apache\apache2.4.41\bin.
where can I download and how to install the mcrypt extension for php 7.1 (TS,VC14) under Windows 10 / 64 bit.
I need it for an akeneo project and this has dependencies using mcrypt (and not other extensions).
I haven't found the right extension dll for it.
Thanks for help.
This example is for PHP 7.4 installed by WAMP in Windows 10 (It will work for others versions if you manage to find the php_mcrypt.dll file for PHP version that you need).
Go to: https://windows.php.net/downloads/pecl/releases/mcrypt/1.0.3/php_mcrypt-1.0.3-7.4-ts-vc15-x64.zip
unpack and copy php_mcrypt.dll to C:\wamp64\bin\php\php7.4.0\ext
Include following lines in C:\wamp64\bin\php\php7.4.0\php.ini and C:\wamp64\bin\apache\apache2.4.41\bin\php.ini:
[mcrypt]
extension=php_mcrypt.dll
Restart Apache server
For other PHP versions you may find the php_mcrypt.dll file in https://pecl.php.net/package/mcrypt or in php windows binaries file: in PHP windows binaries files in ext/ folder https://windows.php.net/downloads/releases/
If you need this code run and it uses mcrypt I doubt if it really requires php 7.1
What might help you (however might not be recommended)
Install Wamp for windows link where you can easily switch between PHP 5 and 7
Wamp isn't ideal for custom php versions but I managed to add some "my-versions" if I did not find interesting ones on the list, you can switch versions by click on the icon at the icon try. left or right (check both ways)
check this link also
Much better in customizing your PHP would be Docker but it requires some learning curve instead of clickable Wamp. However with Docker you can do whatever possible to PHP where with Wamp you'll be always having some obstacles (mainly because of lack of resources how to do something, and specific Windows platform).
If you give up with Wamp, install Docker and run command:
docker run --rm -it php:5-apache php -r 'print_r(get_loaded_extensions());'
to check loaded extensions on php 7 with apache run
docker run --rm -it php:7-apache php -r 'print_r(get_loaded_extensions());'
to see if the php version has mcrypt installed and if not then installing it to docker image of php should't be a big deal (let know in comment if you need info bout that)
Here you have an official PHP image for Docker with description how to install extensions Dockerhub PHP image
Maybe this will help mcrypt-module-open
Best solutions is to install Linux. use a VM or the Windows Subsystem for Linux.
https://learn.microsoft.com/en-us/windows/wsl/install-win10
I am using magic library to change the resolution of the images. But I am getting following error when I am running the Wamp.
I am also sharing links of the website I have followed.
Link
http://www.zoharbabin.com/5-steps-to-get-imagemagick-on-xampp-1-7-3/
These are step by step instructions on how to get ImageMagick running under PHP in a Windows environment. Apache does not provide binaries for Windows and relies upon several sources to do so:
XAMPP
WampServer
Apache Lounge
Bitnami
Apache Haus
It is recommended to download either the XAMPP or WampServer distributions as they are complete packages that contain Apache HTTP server, PHP and MySql known and tested to work together.
Making ImageMagick work was not easy for me. It took two days of trial and error to get this to work. Hopefully this will help you get up and running faster. I have this running on the following:
Windows 7 Home Edition 64-bit
XAMPP 5.6.3
Apache HTTP 2.4.10 (Win32), VC 11
PHP 5.6.3 x86 VC 11, Thread safe
Thus, a 32-bit web framework compiled with VC 11 and thread safety enabled all running on 64-bit Windows 7. You must choose a 32-bit ImageMagick DLL distribution along with a 32-bit VC11 thread safe DLL wrapper to match.
The instructions below should work equally well with WampServer as there is no dependency on the Windows web framework.
The important thing to understand here is that you must know your web server environment and what components are installed and built with. you must match bitness, Visual C runtime, and thread safety configurations together.
Step #1: Install imageMagick to C:\ImageMagick
Go to Link and download the latest release. Use the 32 bit DLL version (ImageMagick-6.9.0.0-Q16-x86-dll.exe)
Install it into C:\ImageMagick directory
Step #2: Get the PHP wrapper from the Windows PECL repository
Go to http://pecl.php.net/package/imagick
Get the latest stable version, 3.1.2. You want the 32-bit, VC 11, thread safe version
php_imagick-3.1.2-5.6-ts-vc11-x86.zip
Step #3: Create distribution directory
Create a /php/ext/imagemagick directory
Copy the ZIP into it and unzip it
Step #4: Make backup copy of DLLs
Make a C:\ImageMagick\Backup directory
Copy DLLs in the C:\ImageMagick directory to the C:\ImageMagick\Backup directory
Step #5: Overwrite DLLs
This is the most important step that if you don't do, will result in the PHP wrapper not loading correctly:
Take all the DLL files in \php\ext\ImageMagick and overwrite those in C:\ImageMagick
If you do a SET on the DOS command line you will see that the ImageMagick installer had created a entry into the system variable environment path (i.e. to C:\ImageMagick). Supporting DLLs will be picked up from there and they will be the Pecl Windows repository DLLs, not the distribution.
Step #6: Set module extension in PHP.INI
First, copy the php extension wrapper php_imagick.dll into the /php/ext directory. Then modify the PHP.INI to do this:
extension=php_imagick.dll
Step #7: Reboot Apache
Reboot Apache
Go to phpinfo and see that imagick is installed as a module.
Here's where you can learn more about your environment.
Pay attention to stuff in phpinfo like:
Compiler: MSVC11 (Visual C++ 2012)
Architecture: x86 (32 bit; as opposed to x64 which is 64 bit)
Thread safety: enabled (TS)
Apache Environment Configuration (PATH should have C:\ImageMagick included)
More gory details: Installing ImageMagick with PHP and Windows
I have installed download and install ImageMagick-6.8.3-7-Q16-x86-dll.exe from the link http://imagemagick.org/script/binary-releases.php#windows and I am using Windows 7 and PHP 5.3.8.
When in install this it got installed correctly in my machine and convert commands works perfectly. On my convert config what shows is here:
But on my phpinfo section I get:
ImageMagick supported formats has no value
I got all the image magick values like this https://www.evernote.com/shard/s297/sh/12397c86-d016-4ca4-9415-fd541daeca39/2fc504bf5ddba5693efd3249402b2b5c.
I don't know why it is getting as no value i have installed the same ImageMagick-6.8.3-7-Q16-x86-dll.exe on php 5.3.8 in my 32 bit windows7 machine . The php_imagick.dll i downloded from other website. I don't know what is the issue i am having in install imagemaagick, if it is the issue with php_imagick.dll version can anybody suggest proper php_imagick version for this configuration?
I have spent several days looking for a solution, and I finally found it with Sysinternals procmon.
I found out apache was looking for dll files like IM_MOD_xxxx.dll in folders c:\windows\system and /bin. Copying the files to one of those folders did the trick to me.
Cood luck.
Not all versions of ImageMagick will work with all versions of php_imagick.dll. The Imagick extension v3.4.* in combination with ImageMagick 7.* gave no support for any image format. When I downgraded to ImageMagick 6.9.* the problem was solved.
On an echo of phpinfo you can see which version of ImageMagick is needed. Search for "Imagick using ImageMagick library version" and "Imagick compiled with ImageMagick version" (which should be equal).
List of binary downloads:
https://www.imagemagick.org/download/binaries/
Or older versions:
http://windows.php.net/downloads/pecl/deps/
Step by step instructions for installing ImageMagick on Windows:
https://stackoverflow.com/a/28872879/2366136
Since its first result on google when looking for solution to this issue I'll add one that worked for me. Source: http://forums.zend.com/viewtopic.php?t=2397#p15226
I was having issues with PHP 5.6, it recognized the extension but no formats were supported. (http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/)
Installing latest version of imagemagick(with dynamic libs) and copying DLL files from imagemagickDir/modules/coders/* and imagemagickDir/modules/filters/* to imagemagick root helped, now imagemagick works properly from when calling php.
Don't forget to give IIS access to imagemagick folder.
EDIT:
When IIS successfully recognized formats, I ran into compatibility issues.
Working combo for PHP 5.6:
http://windows.php.net/downloads/pecl/releases/imagick/3.2.0b2/
http://ftp.icm.edu.pl/packages/ImageMagick/binaries/ImageMagick-6.8.8-9-Q16-x86-dll.exe
Check that
MAGICK_HOME=C:\Program Files (x86)\ImageMagick-6.8.8-Q16\modules\coders
is set.
I had the same problem, and tried everything. You do not need - as I thought - ImageMagick installed on your system to run the Imagick module for PHP. You simply need to make sure you include both the CORE_RL_* dlls as well as the IM_MOD_* dlls in the apache/bin directory, and then also the php_imagick.dll in the php/ext directory.
I'm running PHP 7.0.25 x86 via XAMPP on Windows, and these instructions were incredibly simple and helpful:
https://mlocati.github.io/articles/php-windows-imagick.html
There are a lot of answers out there, as the landscape for this program and PHP have changed over time.
I am so cutting edge as to be using PHP 7.1 at the moment. At first I was copying DLLs all over the place like all of the instructions have you do. Luckily, all that is necessary is the latest PECL package and the corresponding version of Imagick for your system, which was the tricky part. You can't used the latest Imagick (version 7 at the time of writing this) if you want to use the PHP extension, until the extension is upgraded. You have to install a version of Imagick on your system that matches the PHP extension version.
As others have instructed, download the latest PECL package for imagick for your PHP version. Since I'm using the thread-safe x64 version of PHP 7.1, I want the 3.4.3RC1 package, the only one with a DLL for my version of PHP at this time.
Of these files, I only need to copy over php_imagick.dll. Next, head over to http://windows.php.net/downloads/pecl/deps/ and download the latest Imagick for your system which is probably going to be the VC14 one at this point, for which it seems just a matter of installing the corresponding C++ Redistributable package on your system for it to work. Simply unzip the files and add the bin to your path. Again, if you have a newer version of Imagick, you'll want to replace it with this one because this is the one that will work with the php extension.
At this point, you should be able to restart apache and confirm that the imagick extension is enabled in the phpinfo. It should show you the version of Imagick for the PHP extension. Again, if the Imagick on your system in your path is a version that matches what is shown for the PHP extension, then you should see the list of supported formats that it is getting from the DLLs from the version 6 Imagick on your system. You will not need to copy them to apache bin or anywhere else, nor make a MAGICK_HOME folder.
Even after installing imagick & imagemagick correctly, if it is not working, please check your Apache Environment PATH Variable. Most probably if the path variable is not showing your ImageMagick inatallation folder, please add that into windows advanced system settings/environment variables/system variables -> PATH.
Restart WAMP server and check to see the phponfo for Apache Environment PATH Variable.
I searched posts and tried various suggestions - for several hours. I did not attain success until I tried the steps here: https://mlocati.github.io/articles/php-windows-imagick.html (as posted by Codesmith - and I agree the steps are short, easy-to-follow). My need was to install on WAMP.
The page behind this link tells how to determine the correct version to download of Imagick and ImageMagick. Just extract three sets of files to stated directories, make a change in php.ini, and restart WAMP. My code uses only JPEG and PNG formats, so of the format-based DLLs, I moved only those.
How can I install APC on Windows? I am using PHP 5.3, Windows 7 x64.
I used
pecl install apc
I got
C:\PHP>pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes) ............
done: 115,735 bytes 47 source files, building
WARNING: php_bin c:\php\php.exe appears to have a suffix \php.exe, but config
variable php_suffix does not match running: msdev APC.dsp /MAKE "APC - Release"
ERROR: Did not understand the completion status returned from msdev.exe.
Installing an extension with the pecl command means :
downloading the sources
compiling them
And, generally speaking, a windows machine doesn't have what's required to compile software like PHP and/or PHP extensions.
A better / easier solution, in your case, would probably be to find a pre-compiled .dll of the extension, that matches your system and your version of PHP.
With a bit of luck, maybe one of the versions provided on http://downloads.php.net/pierre/ could be OK ?
(It's what kind of acts as replacement of the old pecl4win, until the extensions for windows are available on windows.php.net)
For more informations about which version you should use, take a look at the Which version do I choose? section, in the left side-bar of http://windows.php.net/
It is not really important, whether you are running Windows 32-bit or 64-bit version. What matters is what Apache (webserver) version you have installed (32/64). Since lots of PHP extensions (like APC) are not available for 64-bit systems, most common setup is as follows:
Operating system 32 or 64-bit (not really important). Apache 32-bit will run easily on Windows 64-bit. The difference is, that for 32-bit apache you MUST install PHP 32-bit. Once you install 64-bit PHP, you may find difficult to install some extensions - there are almost no extensions available for 64-bit PHP platform.
therefore your webserver should be 32-bit if you care about special extensions, like APC, Imagick etc... Also you need to know if your apache is thread safe (TS) or not thread safe (NTS) and whether it has been compiled in Visual Studio 6 (VC6) or newser Visual Studio 2008 (VC9). You will easily find all this info from phpinfo() function.
as for the APC, some nice compilation for Windows are available from http://dev.freshsite.pl/php-accelerators/apc.html.
For php 5.3 you use php.net/pierre/php_apc-3.1.10-5.3-vc9-x86.zip.
Download it and copy php_apc.dll to your php ext directory. (I choose the file under ts I have thread safe php installation. There is also an apc dll file for non thread safe.)
Add extension=php_apc.dll into your php.ini file
Restart your web server
Run phpinfo() to see if it's installed or not.
I am using php 5.4 and I downloaded php.net/pierre/php_apc-3.1.10-5.4-vc9-x86.zip and its working fine.
Hope this will help mate.Good luck.
Also, make sure that the compiled version from here http://downloads.php.net/pierre/
matches your php version, otherwise the extension will not load (php v. 5.2.17 requires php_apc.dll v 5.2.17.17 - which doesn't seem to be available as of this writing - I had to downgrade the php version to play with apc).
Another point, pierre's zip packages, at least the one I downloaded, did not include the management script. you can get it from here: http://pecl.php.net/package/APC - select the version you downloaded, then navigate to Browse Source, then find your version in the 'tags' folder. the apc.php script should be there.
There's no available version for php > 5.4.
I'm using APCu instead. Just download the dll and reference it in php.ini.
This website offers updated dll and installers for Apache, PHP and APC compiled to work on windows 64 bit. I've been using it for a while and it works fine. You could an APC version compatible with PHP 5.3.22 here