I found tons of instructions, how to install Imagick on windows. Here is a very good and detaild explanation.
I am following the instructions. So, first, download the latest DLL from PECL. Copy the php_imagick.dll to the extension dir, copy the _CORE* libraries to PHP root directory, and it shows me the following version: ImageMagick 6.9.1-2 Q16 x64 2015-04-14
Wow, great, now I have nothing to do just install this exe.
Oh, wait...
There are no installer like this. And the problems starts here. Of course, I've tried to download and install the latest installer, installed it, set the environment variables, but it always says something about entry points.
I don't know why Imagick guys removes the releases from their ftp, I think this is a very bad behaviour. Can not access from archive too.
So I am unable to installing the Imagick.
Can anybody help me with this version of installer, or give me a step-by-step instruction, how to install this Imagick for Windows 10, 64bit for Apache 2.4.2 64bit, and PHP 5.6.5 64bit?
I tried the 32bit version, but with that, the phpinfo() does not show me anything.
EDIT: There is an alternative download location here.
I started a thread on the Imagick forum, and now I don't know, should I cry or should I laugh...
The answer for my question was this:
Hmm... it seems we don't build our libraries with 'deprecated' methods. I will see if we can change this before the next release so DrawAllocateWand will not suddenly be gone.
I tell to the guy, ok, it's a cool thing, but I've just reinstall my machine from the scratch, so, I got this error:
Procedure entry point (DrawAllocateWand) not found in DLL
or something similar, I translated it.
So, please tell me, where can I download the ImageMagick 6.9.1-2 Q16 x64 2015-04-14 binaries, because it seems, that php_imagick.dll need this, and I should work...
The answer was:
We don't keep an archive of old binary version of ImageMagick. You could however decide to build IM from source.
CONCLUSION
If you ever had a working installer for windows for Apache, PHP, Imagick, you should always keep these in the cloud for yourself. MHO: I really hate these things. I know, most of us is working on linux boxes, but our company policy is to use OS what admin says. So I need to use windows. Now I should suck for a while, to download and install a cygwin with compilers, compile the Imagick somehow, and set all the environments variables, because some developers do not use a version controller, or maybe the sotrage is too expensive for them to store old binaries... I can not imagene these options.
ImageMagick is available here:
http://windows.php.net/downloads/pecl/deps/
Imagick, that has been compiled against that version of ImageMagick is available here
http://windows.php.net/downloads/pecl/releases/imagick/3.4.0rc5/
Downloading random versions of libraries from other places is not guaranteed to work.
Related
I just got handed a big project running Symfony 3.4, and PHP 5.6, that I'm trying to get working on my "new" Mac Catalina (just purchased and installed, not upgraded from a previous macOS version), and I've gotten things working up to a certain point:
our-symfony-3-project $ bin/console server:start
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php#5.6/bin/php
Reason: image not found
zsh: abort bin/console server:start
I was able to fix a previous similar error with needing openssl 1.0.0 (I had to compile it from source using Homebrew then link it), and I think the solution is the same here, but it appears that I need to find the library or repo or download for icu4c version 64 (not sure I'm reading this right) to get brew extract to install it (it won't any other way), or figure out how to compile it and manually get it working for PHP 5.6, and I'm not finding the library I need apparently.
I've gone through pages and pages and probably a hundred command attempts trying to fix this error... and so far the recommendations have either been outdated (due to macOS/brew changes), or just didn't work.
I'd like to know where I can find the appropriate file/download/repo to just be able to install or compile this through brew or otherwise. PS: I know we shouldn't be using old versions but I just got this job and the company will not upgrade for a while.
I'm answering this by saying that I got the repo to work on a PHP 5.6 host using MAMP Pro (and Apache, not that that's relevant)... which already had the required libraries in question.
I went through the docs on the trial version (version 6.3.2):
https://documentation.mamp.info/en/MAMP-PRO-Mac/Settings/Hosts/General/
However, unlike Homebrew, switching PHP versions across hosts in MAMP Pro doesn't overwrite PHP symlinks like brew unlink and brew link does, I have to still edit my .zshrc file aliases and my PATH to have things like php (or pecl or pear etc) point to the MAMP Pro PHP version folders to get them to work correctly with the repos, as well as with composer (which runs the php command). Even MAMP's documentation says to modify the files yourself...
I can't tell yet if this difficulty is just natural to having multiple hosts with different PHP versions configured, as I could see how multiple variations running at the same time could conflict if they're using the same system files (like /usr/local files)... which sound like system software dependencies, and I don't know that these dependencies could be relegated to their own host folders (like /Applications/MAMP/bin/php/php5.6.40 folders), or maybe I just missed something somewhere. I'll update this answer if I learn better what to do here, or will add another answer if I find a way to do them using Homebrew better.
Today I have tried to install imagick in my xampp a hundred times. And I did it. If you have troubles, please try following these steps:
Since xampp is x86, check if your Image Magick (the program) is x86. If not, download the latest version here: imagemagick.org/script/binary-releases.php#windows
Please remember that u MUST download the Win32 dynamic at 16 bits-per-pixel.
Install Image Magick at C:\imagemagick.
Download the latest stable version of imagick here: . You MUST download the 5.x Thread Safe (TS) x86. The x in 5.x is the version of your PHP.
Put the php_imagick.dll in php/ext folder of your xampp installation.
Add this in your php.ini: extension=php_imagick.dll
Here is when I have a lot of trouble. If you try to start the server (or writing php in the console (start->cmd)), you will get an error. If that error says something like this: Unable to find the entry point for the procedure FlattenImages in the DLL CORE_RL_magick.dll it means that you're well underway.
Now, you must go into the installation folder of Image Magick and overwrite the DLL you downloaded with the php_imagick.dll. All of them start with the prefix CORE_RL_.
Once you overwrote all of them, you can try writing php in the windows console. I don't say something means that the imagick is functional (you can check in localhost/xampp/ > phpinfo() link. Personally, I had to install a new DLL: vcomp110.dll.
If someone has the same error as me (the system can't found the vcomp11.dd) download it here
Now, if you try executing php on console, or just initializing the apache module of xampp, you should not have errors.
Goodbye and hope I can help someone.
EDIT: when tried to convert some-img.bmp some-result.jpg in the console, I had this error:
convert.exe: unable to open module file 'C:\Users\my-acc\.magick\IM_MOD_RL_BMP_.dll': No such file or directory # ...
This happened when there is no folder .magick in my-acc. The thing you need to do is this:
Create a folder named .magick in the my-acc folder. Since the name starts with a stop, you need to create it through the console. Here are the commands:
1.1. c:
1.2. cd Users\my-acc
1.3. mkdir .magick
Go to C:\imagemagick\modules\coders and copy the entire files into the latest folder created.
Now, you will be able to use Image Magick through the commands or the PHP Classes.
On background, if you use Codeigniter, i have no idea how to use the image_lib with imagick. So, it's better with the own imagick classes. Here a simple example:
$image = new Imagick($upload_data['full_path']);
$image->thumbnailImage(250,0);
if($image->writeImage($upload_data['file_path'].$upload_data['raw_name'].'_thumb'.$upload_data['file_ext'])){
something here;
}
$image->clear();
This answer might be extremely naive, but, I've found that getting things done in Windows is generally too painful. Many people agree with that and have found solace in a tool known as "chocolatey".
First, install chocolatey on your Windows machine (super easy install instructions):
https://chocolatey.org/
Then, use chocolatey to install everything else that you need (imagemagick in this case):
https://chocolatey.org/packages/imagemagick
I suspect you might have to do some minor tweaking to configuration files after that, plus handle all of the "Windows permissions" needed to get things to work smoothly. Permissions are can be as simple (and not necessarily safe) as "full control" to some user, plus activating inheritance and overwriting all children's settings to use inheritance.
In short, install, configure, permissions, go.
PS. This answer might be incomplete/prototypical/experimental, since I don't run codeigniter, php, imagemagick on Windows.
This how-to of Winderfind is wonderful, but for me it was not yet complete to troubleshoot all problems. First of all, have a look at this tutorial:
http://hrt0kmt.hatenablog.com/entry/2015/05/27/170608
Secondly I discovered that not all versions of ImageMagick will work with all versions of php_imagick.dll. Check out my and others answers on this post for further troubleshooting:
ImageMagick supported formats no value
Great tutorial,
If you are running windows 11, and installing xampp with php 8.1, you need to install 64bit versions:
Win32 dynamic at 16 bits-per-pixel
Becomes
Win64 dynamic at 16 bits-per-pixel
And
5.x Thread Safe (TS) x86
Becomes
8.1 Thread Safe (TS) x64
If you've installed the 32bit versions (as I did), you can just download the 64bit versions and overwrite all the files. Then restart apache and it should start working.
Could anyone be kind enough to point me to a link for the latest version (1.0.3.1) of the PECL extension Upload Progress, compiled as a windows 32 bit DLL?
I've had a look on http://downloads.php.net/pierre/ but it doesn't seem to hold the latest version, I have the one from there and although its installed and running, its not returning data for me.
I know my code is good as I use a linux hosting server, and everything works - I just develop on Windows and its a little bit annoying not to be able to fully test a project without uploading.
Here's a link from anatoliy belsky:
uploadprogress.dlls
I found a few related posts here but didn't get my answer. So posting again.
How would I install a PECL extension on windows? Say I want the PECL oAuth extension on Windows XP.
I know 2 methods, but none of them is working for me.
The site http://pecl4win.php.net/ is down for months. So I cant download the DLL. Is there any place we can download the DLLs from ?
running the command
pecl install oauth-0.99.9.tgz is throwing the error
The DSP oauth.dsp does not exist.
I tried with few other extensions also and getting the same error.
What am I missing here?
Releases can now be found here:
http://windows.php.net/downloads/pecl/releases/
If you need an extension not available there you might ask on the pecl-dev at lists.php.net mailing list.
I got what I am looking for in http://windows.php.net/downloads/pecl/releases/
Currently PECL for windows is in an odd reformation state. The reason being that I believe they are trying to provide VS2008 source versions. I would actually suggest using Zend Server for now until the windows half of the php group gets everything fixed up. Zend Server includes almost all of the extensions that you can find in PECL, and everything else, if you are lucky, you could find an compile yourself.
The PECL installer downloads the source code of the extension and tries to compile it with your local C compiler. The problem is that the whole process is designed for Unix systems, where a C compiler is available or can be easily installed. Setting an environment to compile C code under Windows is pretty complicate.
The ideal solution is getting a DLL file that someone already compiled. That's what the pcle4win site was for. However, there's currently no official repository to download PECL DLLs so you only have two alternatives:
Find an unofficial DLL somewhere in Google
Compile it yourself (another link) with Microsoft Visual Studio
It'd be cool that there was a DLL repository out there but I'm unaware of any.
The php source ships with a set of configuration scripts for windows (using windows script host) that mimics the autoconf tools as far as php is concerned. If you place the code for the extension in a directory under the /ext directory (where all the other extensions like bcmath, bzip, ... are located) you can let the buildconf-script create a makefile that includes the build rules for that (new) extension.
There's a step-by-step walk-through at http://wiki.php.net/internals/windows/stepbystepbuild which seems to be brief but feasible.
compiled oauth: http://windows.php.net/downloads/pecl/releases/oauth/
another pecl extension: http://windows.php.net/downloads/pecl/releases/
Is there a .dll version of the inclued extension for PHP?
The manual's link for Inclued on PECL4WIN doesn't help. I don't have a compiler to build my own DLL.
NOTE: The spelling "inclued" is correct!
Edit: I don't have a compiler, but do know someone with one... that's really a last resort though.
As best as I can tell, the Windows version doesn't exist anymore. Maybe whoever was maintaining it before had to stop for some reason.
I wonder what it takes to compile a PECL extension under Windows.
Edit
Here's some info on compiling a different PECL extension on Windows. You may be able to extrapolate to the inclued extension.
Edit
WAMP Server comes with PECL & PEAR. I can actually run the command pecl install inclued-alpha from the Windows command-line and it goes out and tries to grab the inclued extension from the PECL site.
Unfortunately it dies when it unpacks the .tgz file and tries to compile it
ERROR: The DSP inclued.dsp does not exist.
Which version of PHP are you running? I know someone that can compile you a version.
update
Alright, got this compiled - I've tested on my 5.2.6 build and it seems to work fine.
I've been told there may be problems using it in a threaded environment (e.g. Windows) but that's only a maybe. Also:
[13:10] <g0pz> the inclued dumpfiles will collide, because it uses PID # + increments
[13:11] <g0pz> but command line should work ok
[13:12] <g0pz> is the threaded apache version which'll have the same PID and well, a "possible" collision
So good luck with it :)
download
Poke me if you have any issues with inclued.
I'm just on the verge of putting out a release, I'll do a mkstemp() in windows instead of picking the PID + count.
Hopefully also with a gensvg.php which'll render the di-graph in-browser with pear::Image::GraphViz.
Isn't this their DLL download site? http://pecl4win.php.net/list_dlls.php
Unless I'm off on my browsing of the site?
Is this the page you are looking for?
http://pecl4win.php.net/list_dlls.php
..edit: (man, we are fast. I swear these two duplicate answers were posted simultaniously)
The official PHP for Windows site says:
PECL For Windows
PECL extensions for Windows is being worked on. The interface on the
pecl website will most likely be updated to offer Windows DLL download
right from that website. In the meantime, some extensions can be found
here.
That "here" link leads to http://downloads.php.net/pierre/, where you will find, among the multitude of other extensions, builds of inclued for PHP 5.2 and 5.3, VC6 and VC9, thread-safe and non-thread-safe. The one matching my version of PHP seems to be working.