Тема: ImageMagick на FreeBSD под управлением ISPmanager
Опции темы
Поиск по теме
ImageMagick на FreeBSD под управлением ISPmanager
Итак, имеем ФрииБСД.. VPS.. ISPmanager..
Необходимо установить расширение PHP ImageMagick, в панели управления его нет и для установки недоступно.
Как советовали здесь, выполнил:
whereis ImageMagick
cd _папка_
make install
Оооочень долго \минут 30-40\ что-то писало.. потом вроде все.
Далее, как я понял, нужно поставить pecl-imagick.
Скачал его командой fetch . далее начались траблы..
localhost# pecl install imagick
pecl: Command not found.
и тут все пошло не так. Далее, на любой запрос шелл начал отвечать Abort, и, в итоге, сервер жестко завис. Хостер выполнял перезагрузку со своей стороны т.к. был потерян доступ к серверу даже через VMware vSphere Client
все должно поставиться само
ls
установка началась и продолжалась продолжительное время.
Только что закончило такими записями:
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
— add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
— add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
— use the `-Wl,—rpath -Wl,LIBDIR’ linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
Build complete.
Don’t forget to run ‘make test’.
===> Installing for pecl-imagick-3.0.1.r2
===> pecl-imagick-3.0.1.r2 depends on file: /usr/local/include/php/main/php.h — found
===> Generating temporary packing list
===> Checking if graphics/pecl-imagick already installed
===> Registering installation for pecl-imagick-3.0.1.r2
************************************************** **************************
The following line has been added to your /usr/local/etc/php/extensions.ini
configuration file to automatically load the installed extension:
************************************************** **************************
===> Cleaning for ImageMagick-nox11-6.6.3.10
===> Cleaning for xz-4.999.9_1
===> Cleaning for ghostscript8-nox11-8.71_6
===> Cleaning for jpeg-8_3
===> Cleaning for png-1.4.3
===> Cleaning for tiff-4.0.0
===> Cleaning for liblqr-1-0.4.1_2
===> Cleaning for fftw3-3.2.2_1
===> Cleaning for libfpx-1.2.0.12_1
===> Cleaning for jbigkit-1.6
===> Cleaning for jasper-1.900.1_9
===> Cleaning for lcms-1.19_1,1
===> Cleaning for freetype2-2.4.2
===> Cleaning for fontconfig-2.8.0,1
===> Cleaning for jbig2dec-0.11
===> Cleaning for gsfonts-8.11_5
===> Cleaning for glib-2.24.2
===> Cleaning for gio-fam-backend-2.24.2
===> Cleaning for libglut-7.4.4
===> Cleaning for gamin-0.1.10_4
===> Cleaning for glproto-1.4.11
===> Cleaning for dri2proto-2.2
===> Cleaning for libX11-1.3.3_1,1
===> Cleaning for libXext-1.1.1,1
===> Cleaning for libXxf86vm-1.1.0
===> Cleaning for libXdamage-1.1.2
===> Cleaning for libXfixes-4.0.4
===> Cleaning for libXi-1.3,1
===> Cleaning for libXmu-1.0.5,1
===> Cleaning for libGLU-7.4.4
===> Cleaning for libxcb-1.7
===> Cleaning for xorg-macros-1.6.0
===> Cleaning for bigreqsproto-1.1.0
===> Cleaning for xcmiscproto-1.2.0
===> Cleaning for xextproto-7.1.1
===> Cleaning for xtrans-1.2.5
===> Cleaning for kbproto-1.0.4
===> Cleaning for inputproto-2.0
===> Cleaning for xf86bigfontproto-1.2.0
===> Cleaning for libXau-1.0.5
===> Cleaning for libXdmcp-1.0.3
===> Cleaning for xproto-7.0.16
===> Cleaning for xf86vidmodeproto-2.3
===> Cleaning for damageproto-1.2.0
===> Cleaning for fixesproto-4.1.1
===> Cleaning for libXt-1.0.7
===> Cleaning for libGL-7.4.4
===> Cleaning for libcheck-0.9.8
===> Cleaning for libxslt-1.1.26_2
===> Cleaning for xcb-proto-1.6
===> Cleaning for libpthread-stubs-0.3_3
===> Cleaning for libSM-1.1.1_2,1
===> Cleaning for makedepend-1.0.2,1
===> Cleaning for libdrm-2.4.12_1
===> Cleaning for libgcrypt-1.4.6
===> Cleaning for libICE-1.0.6,1
===> Cleaning for libgpg-error-1.8
===> Cleaning for pecl-imagick-3.0.1.r2
localhost#
Все верно?
Куча установленного всего прочего — обязательны?
Как в дальнейшем производить обновления? (это же ведь бета-версия)
Тем не менее, в панели управления появилась запись imagick.so в разделе «Расширения ПХП». Правда, предварительно я вносил запись в конф.файл панели «extension=imagick.so» >> /usr/local/etc/php/extensions.ini
Сейчас проверю на работоспособность.. \\\\ проверил \\ работает!
Последний раз редактировалось rednex; 17.10.2010 в 00:17 .
Установка и настройка
Содержание
User Contributed Notes 22 notes
Steps to Install ImageMagick on UwAmp for Windows:
as of March 31, 2016
Detailed guide for newbies like me.
My PHP version is: 5.6.18, and Thread Safety is Yes from
Step #1, so I downloaded:
5.6 Thread Safe (TS) x86
I got: php_imagick-3.4.1-5.6-ts-vc11-x86.zip
5. Unzip and copy «php_imagick.dll» to the php extension folder:
In my case:
php_imagick.dll —> C:\UwAmp\bin\php\php-5.6.18\ext
Note: this ZIP also contains dlls which other guides says
to extract to the extension folder of apache.
NO NEED TO DO IT. Step #3 has taken care of it.
6. Edit «php.ini» and add at the very end (could be
anywhere I suppose):
For super newbies: click the edit button in the UwAmp UI,
«php_uwamp.ini» will open and edit it. It will be copied to
the correct php.ini when UwAmp is restarted. I had
trouble at first since there are several php*.ini scattered
all over.
7. Restart Apache
8. Check PHPInfo
scroll to section (or find): imagick
number of supported formats: 234
If there is no «imagick» section or «supported format» is 0,
something went wrong.
Hope this helps.
Steps to Install ImageMagick on UwAmp for Windows:
as of March 31, 2016
Detailed guide for newbies like me.
Took a long time to get it to work.
I initially followed:
http://php .net/manual/en/imagick.installation.php
but after installation, PHPInfo under imagick shows
number of supported formats = 0
So I followed these steps, clobbered from various sources
to get it to work.
1. Open PHPInfo and check:
Architecture = x86 or x64
Thread Safety = yes or no
2. Download ImageMagick from:
In my case I downloaded: ImageMagick-6.9.3-7-vc11-x86.zip
because the Architecture under PHPInfo is x86
as for vc11 or vc14
search google for «visual c++ 11 runtime» or
«visual c++ 14 runtime» and install it
3. Unzip and copy all dlls from the bin subfolder to the
Apache bin directory. It’s a bunch of CORE_RL_*.dll
and IM_MOD_RL_*.dll plus a few other dlls.
In my case, I installed UwAmp in C:\UwAmp, so:
(from zip) bin/*.dll —> C:\UwAmp\bin\apache\bin
it is important to install correct version of Visual C++ redistributable Package.
for ImageMagick-6.5.8-10-Q16-windows-dll.exe —
Visual C++ 2008 Redistributable Package
To install on Ubuntu or Debian, using the package manager, use:
sudo apt-get install php5-imagick
sudo service apache2 reload
After 2 hours of looking for help from different documentation & sites, I found out none of them are complete solution. So, I summary my instruction here:
1) yum install php-devel
2) cd /usr
3) wget http://pear.php.net/go-pear
4) php go-pear
5) See the following line in /etc/php.ini [include_path=».:/usr/PEAR»]
6) pecl install imagick
7) Add the following line in /etc/php.ini [extension=imagick.so]
8) service httpd restart
Hopefully, I can save other engineer effort & time. Good luck!
Mac 10.10 Yosemite
install php via «Homebrew», then:
$ brew install php53-imagick
and then:
reload php-fpm (or restart apache)
For installing imagick in Windows do the following:
1. Download and install the ImageMagick API from http://www.imagemagick.org/script/binary-releases.php#windows. (In my case, I installed the lastest version: ImageMagick-6.9.2-10-Q16-x64-dll.)
2. Go to http://pecl.php.net/package/imagick and choose the version of imagick that best suits your PHP version. (Because I had PHP 5.4 I downloaded «php_imagick-3.3.0-5.4-ts-vc9-x86.zip».
3. Extract the contents of the zip file and go to the directory where the files were extracted.
4. Copy the php_imagick.dll in yout PHP’s ext folder.
5. All the other dll that you extracted from the zip file can go into apache’s bin directory. In my case, I have apache 2.2 and the bin directory is at: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin.
6. Activate the extention in your PHP.ini file by adding the following:
[Imagick]
extension: «C:\Program Files (x86)\PHP\ext\php_imagick.dll»
7. Restart apache
8. Sit back and relax
I too had the error «Please provide a path to MagickWand-config or Wand-config program.» when installing on linux (in this case CentOS aka Red Hat).
The simple solution was to ensure «ImageMagick-devel» and NOT «ImageMagick» package was in place. Next comes the standard command:
pecl install imagick
Lastly, and as per the otherwise flawless instructions, edit php.ini to include:
extension=imagick.so
Simple way to install ImageMagick on your linux machine(RHEL5,Cent OS 5)
#yum install ImageMagick*
#pecl install imagick sometimes you may have ask to install gcc compiler. if so execute #yum install gcc*
added the extension on php.ini
#echo «extension=imagick.so» >> /etc/php.ini
#service httpd restart
If you want to install ImageMagick on Nginx for Windows, in addition to setting php_imagick.dll extension, you should set an environment variable like so:
— First download ImageMagick package (if you haven’t already) *
https://windows.php.net/downloads/pecl/deps/
— Extract it to any folder for example «C:\ImageMagick-xxx\»
— Edit the «PATH» variable and add a new entry with value «C:\ImageMagick-xxx\bin»
* Note: The ImageMagick package you download should match your php Compiler (i.e Visual C++ 2017), Architecture (i.e x86 or x64) and «Thread Safety». All of these can be viewed from php_info()
Recently I had to install ImageMagick on FreeBSD. The following commands achieved this without a problem.
cd /usr/ports/graphics/ImageMagick-nox11/
make install clean
service apache22 stop
cd /usr/ports/graphics/pecl-imagick/
make install clean
service apache22 start
NOTE: For some of the package dependencies you will be prompted to select optional add-ons. I left all the config options untouched except for those which provided integration with the X11 system. Those once I disabled.
imagick 2.2.2 might have a problem loading in PHP 5.3 by giving following error at start-up:
PHP Warning: PHP Startup: Unable to load dynamic library ‘. /imagick.so’ — . /imagick.so: undefined symbol: XStringListToTextProperty in Unknown on line 0
in this case, revert to PHP 5.2.8 and imagick-2.2.0 will work just fine.
I have php 5.3.1 running on apache on windows (with xampp)
to get this working i installed the appropriate image magick from here http://imagemagick.org/script/binary-releases.php#windows
Then i needed the php_imagick.dll for vc6 (because im on apache not iis).
Hope this helps ^^
Windows installation is a bit more tricky since «pecl install imagick» does NOT work properly.
Here’s how I installed it:
1/ Install ImageMagick software http://www.imagemagick.org/script/binary-releases.php#windows
2/ Download pecl-5.2-dev.zip (choose the version relevant to your PHP) from http://snaps.php.net/
3/ Copy php_imagick.dll from the archive you’ve downloaded to your PHP extention folder.
4/ Add the following line to php.ini (in the exntentions section):
extension=php_imagick.dll
5/ Restart your server
6/ Try the example script to see all went well
This works for me
Sins I tried around a lot and searched the net to find a working dll for ImageMagic and PHP5.4, with bad results I at last found one working.
There is a guy (Mikko) that has a blog and he wrote about this and and have compiled a working solution. You find his blog about this here: http://valokuva.org/?m=201211.
Hope that this helps others as well.
So, your installation in general works so that you can display the output from a PHP script— even phpinfo(); works. Great start. If not, you likely have bigger problems or are compiling imagick into PHP. Best of luck.
But, back to where we are; PHP in general works, except the imagick extension isn’t working or needs installed or something.
There is some very helpful information in the phpinfo(); output blocks.
(If phpinfo(); means nothing to you, hit the google. We’ll wait.)
Notably the php.ini that PHP is using can be found there, very important. —Many instructions will tell you to put «extension=imagick» into it.
Better would be to create an imagick.ini file (that has «extension=imagick» inside) in the directory scanned for additional .ini files.
This is nice when the machine you are working on has multiple php.ini files and unused configurations littered about. phpinfo(); will tell you where the resources being used can be located in the file system.
Helpful to me, thought I’d share.
I have spent many hours trying to get Imagick work on Windows. Finally I have succeeded!
Addendum to Ian Co’s «Steps to Install ImageMagick for Windows» specifically for Uniform Server Z and how to fix if you get an empty list of ImageMagick supported formats):
Thanks to Ian Co’s comments above for setting me in the right direction.
My Uniform Server is installed to B:\UniServerZ, adjust the following steps to your specific installation.
If you’ve been messing around with a gazillion solutions like me, first delete any previous copies of imagemagick dll-s (i.e. IM_MOD_RL. dll-s, CORE_RL. dll-s) from your sysem, i.e. I had copied them to C:\Windows\system, B:\UniServerZ\core\php56, B:\UniServerZ\core\php56\extensions.
Extract contents of bin folder to B:\UniServerZ\core\php56 (or whichever vresion of php you are using)
2. Download the appropriate imagick package from http://pecl.php.net/package/imagick/3.1.2/windows
For me the right one was php_imagick-3.1.2-5.6-ts-vc11-x86.zip , check phpinfo whether you need the thread-safe version or not and which architecture.
Extract php_imagemagick.dll ONLY (and not the other dll-s) to B:\UniServerZ\core\php56\extensions
Previously I had tried ImageMagick-6.9.3-7-vc11-x86.zip and ImageMagick-6.9.3-7-vc14-x86.zip but the dll-s here did not work, perhaps because Uniform Server was compiled using VC9? and these were compiled with later versions!? What a mess.
I had also tried creating a C:\ImageMagick and adding it to PATH user-level and to MAGICK_HOME system-level environment variables, but this proved unnecessary (although it also works).