How to configure imagick / ImageMagick on ipage? - php

Ipage says they are running ImageMagick 6.3.3 however, it is not running on the server and there is no way I can find how to enable it. They do not allow to configure any module from control panel.
I contacted support but they could not help saying, it is not 'their' product. Anybody can help setting up Imagick on ipage? I tried to edit php.ini file and reference to php_imagick.dll but that did not solve the problem.

iPage does not support Imagick in PHP
This is their official response after conctacting support
We have ImageMagick binaries. But it is not complied to PHP so IMAGICK
won't work. So, you will not be able to use IMAGICK as PHP built-in
class. You have to use the alternative "convert" utility. Please make
changes accordingly in the script so that it will work fine on our
servers.
So basically you have to use exec() in PHP to use the Imagemagick convert command. Also you cannot use convert command from a shell environment as for as I know.
But there is GD commands available on ipage and for the most part they would be enough for all graphic related functions. In fact in my case, I found that they were rather moreful.

The answer I got from iPage is that PHP Imagick is not available on the Essential Package. To get PHP Imagick I would need to sign up for VPS hosting which is more expensive. For now I am giong to ignore the recommendation from Wordpress to install PHP Imagick. I have installed the Wordpress "ImageMagick Engine" plugin and it is now working with no errors.

Related

How to install imagick in xampp/wampp in Windows

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.

Cannot find any of the supported PHP image extensions

I am trying to run kcfinder with ckeditor and i am getting the message
Cannot find any of the supported PHP image extensions!
What is reason ?
It's probably looking for GD and/or ImageMagick extensions. Clearly you have neither installed.
The reason they're not installed will depend on who hosts your PHP environment. It seems likely that shared hosting providers may not have them enabled.

Lack of Heroku PHP GD setup for JPEG files causing issues

Heroku does not support GD setup for jpg. Because of this I am not able to create collage out of profile pics, which are only in jpg format. I am having the same issue as the below link.
http://groups.google.com/group/heroku/browse_thread/thread/5f0b169272dd075f/5926d2e6eace859c?utoken=sizyOCkAAAD0zGxoh6dI3732ocaO_CKc0UdN2a4MLXn0dn7f9oF9dw34Femrnx-0ZHcOkI9yXY0
How do I resolve this issue?
My alternative was to use imagick.so extension instead. See my reply #stackoverflow here for instruction how to get this extension up and running quickly. Let me know if this works (the few basic functions I tried are ok).
The official buildpack from Heroku doesn't list PHP. Strange.
Heroku does support ImageMagick. I ran in to the GD/JPG problem hosting a WordPress site, but it was easily fixed by installing the imagemagick-engine plugin. Using it from the command line works with the path /usr/bin . The PHP module is not installed.

imagecreatefromstring() [function.imagecreatefromstring] No JPEG support in this PHP build

I am getting error mentioned in the subject when trying to upload in wordpress admin interface.
My server's running nginx with php-fpm, PHP version is 5.3.0.
I've googled quite some regarding this problem but I wasn't able to find any solution. Is there a way to enable JPG support for GD without recompiling the PHP completely? (I've tried to follow that path but I can't get ./configure with all the needed to complete properly and I just don't have time to fix all the errors with all the libraries).
Thanks!
No. You'll have to recompile php.

What are the odds of GD or ImageMagick already being part of a client's PHP install?

I'm working on a package which includes rescaling of images in PHP. For image rescaling, PHP has the GD and ImageMagick libraries. Are those likely to be part of a given client's PHP install already?
Is there a "default" install of PHP, for that matter? By default, are either GD or ImageMagick included?
If neither is installed, should I have some sort of horrible fallback position of reading, rescaling, and saving GIFs, JPGs, and PNGs, or is it simple to add GD or ImageMagick to an existing install?
i can't remember when i've last seen a lamp hosting provider without GD. the imagemagick extension is not that widespread. if they run their server themself, they really should be able to activate one of it or both. in your place i'd build the full functionality with GD and a (probably reduced) imagemagick fallback. if they got neither, show them the basic concepts of the wheel and/or fire, they should be grateful.
PS: i encountered providers that deactivated certain GD functions (computationally too intensive on a shared hosting environment), like imagerotate and imagefilter.
GD is the easiet library to include in php.. it is "only" an extension, mainly included in php packages... the only operation needed is to activate the extension.
Regarding ImageMagik, it is more complecated, since the php imageMagik library is only an interface for the image magik software.
Using imageMagik require both software and php library installed
It is reasonable to expect the client to have the capability or an understanding of how to add the library. Are you selling software or servers maintenance?
If you're going for the whole "ease of use" angle, you'll want to package php with your app (and GD installed already), of which I'm not sure the legality. (but there's probably some way to get it done)
90% GD - 10% ImageMagick
Windows - Yes
Linux/MAC - No (but fairly easy to install)

Categories