المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : السي بانال CPanel تثبيت install ImageMagick



Rise Company
09-02-2021, 04:26
السي بانال CPanel تثبيت install ImageMagick
Install Imagick on cPanel/WHM Server
حل مشكلة module 'imagick' already loaded in unknown on line 0


https://www.rise.company/forum/images/imported/2021/02/11.pngimagick – popen error remove “popen” from disable_functions
Let see how to install ImageMagick on CentOS 7 Cpanel server easily.
1st you have to remove “popen” from disable_functions in php.ini, otherwise, you will get this error

https://www.rise.company/forum/images/imported/2021/02/12.pngdisable_functions let’s get started with imagick
You can use WHM to do the installation with the following steps:
1. Login to WHM as the root user
2. Navigate to: Home »Software »Module Installers
3. Click on the Manage link to the right of “PHP Pecl”
4. Select the version of PHP from the drop-down and click Apply
5. Under “Install a PHP Pecl” enter “imagick” (without the quotes)
6. Click “Install Now”
https://www.rise.company/forum/images/imported/2021/02/13.pngimagick-install end up with

https://www.rise.company/forum/images/imported/2021/02/10.png

Run the following command:



[root@ds77 ~]# echo 'extension=imagick.so' > /opt/cpanel/ea-php73/root/etc/php.d/imagick.ini


Next Restart apache and php-fpm service
now you are done

--------------------------------------------------------------------

You can also install the extension from WHM. Navigate to Home - Software - Module Installers, then click on the Manage button next to PHP Pecl.

https://www.rise.company/forum/images/imported/2021/02/7.png
In the next screen, select the required PHP version, then click Apply.
https://www.rise.company/forum/images/imported/2021/02/8.png
You can now enter “imagick” in the Install a PHP Pecl field, and click the Install Now button.
https://www.rise.company/forum/images/imported/2021/02/9.png
The extension should be compiled quickly, look at the bottom of the log on the screen for the confirmation that it was built successfully.
https://www.rise.company/forum/images/imported/2021/02/10.png



1) On WHM/cpanel
Home »Software »Module Installers
2) PHP Pecl
3) i Selected PHP version (7.3) and apply
4) On the “install a PHP Pecl” box type “imagick” without the quotes and click install now.

-------------------------------------------------------------------------------


للتاكد من ان التثبيت يعمل بشكل سليم ام لا

قم برفع ملف test.php المرفق فى المرفقات

To test if the extension works, you can run this PHP code:




<?php
$image = new Imagick();
$image->newImage(1, 1, new ImagickPixel('#ffffff'));
$image->setImageFormat('png');
$pngData = $image->getImagesBlob();
echo strpos($pngData, "\x89PNG\r\n\x1a\n") === 0 ? 'Ok' : 'Failed';


وشوف النتيجة الى هتظهر ok ام لا

اذا ظهر خطا 404 وقف .htaccess

اذا ظهر صفحة بيضاء اعمل ريستارت php + انتظر 5 دقائق + جرب حساب اخر

لابد وهيظهر لك انه يعمل

المرجع:
https://mlocati.github.io/articles/php-windows-imagick.html

-------------------------------------------------------------------------------


https://youtu.be/l6qCOE9GxEs

اذا ظهر خطا فى imagic هتجد ان المشكلة ان البرمجة غير متوافقه مع اصدار php الحديث ويجب النزول الى اصدار php 5.6 حتى يعمل بدون مشاكل

المرجع:
https://bigstep.com/blog/how-to-install-imagemagick-in-whm
https://www.supportclients.com/imagemagick-installation-on-cpanel-server/

Rise Company
10-02-2021, 12:54
قبل ذلك يجب عمل

Install a Perl Module Image::Magick

Rise Company
10-02-2021, 14:30
هذه الخطوات لن تفيد , ولكن للافادة فقط
للتاكد جرب كود فى ملف test فى الرد التالى

---------------------------------------------------------

An I figured it out my self. Yayyyyy!!

I found that somehow there were two ImageMagick's directories on my server. Not sure how!
I found two separate directories :
/usr/include/ImageMagick-7
/usr/include/ImageMagick-6

Anyways, I wanted to try re-install ImageMagick and I found the install version using :

rpm -qa |grep ImageMagick

which gave me following result:
ImageMagick-6.9.10.68-3.el7.x86_64
ImageMagick-devel-6.9.10.68-3.el7.x86_64

I remove it using :

yum remove ImageMagick-6.9.10.68-3.el7.x86_64
it removed the dependencies as well.

Then I installed it again using Yum:

yum install ImageMagick ImageMagick-devel ImageMagick-perl php-devel gcc

It should installed ImageMagick again.

After that tried enabling the php image magick extension on php 7.4 again (manually and using cPanel) but unfortunately It failed again.

Investigating it further I found that in the make command it was referencing the path /usr/include/ImageMagick-7 I guess it was used as well.

I though why not installed the latest version of Imagick, so I followed the installation below :


# wget https://www.imagemagick.org/download/ImageMagick.tar.gz
# tar xvzf ImageMagick.tar.gz
# cd ImageMagick*
# ./configure
# make
# make install


# magick -version
Version: ImageMagick 7.0.8-35 Q16 x86_64 2019-03-27 ImageMagick (https://imagemagick.org)
Copyright: © 1999-2019 ImageMagick Studio LLC
License: ImageMagick (https://imagemagick.org/script/license.php)
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib fontconfig freetype jng jpeg lzma png tiff x xml zlib

and I guess it installed ImageMagick-7 again.

After this installing the php extension from cpanel (module installer > install pecl) worked charm. Finally got it working!!!!!!!!!

Not sure how I came from reinstalling 6 and installing 7. That made no sense to me after giving it a thought but I guess I was frustrated spending long hours trying to fix it, so wanted to try everything.

المرجع:
https://forums.cpanel.net/threads/issue-with-imagick-and-php-7-4.681589/

Rise Company
10-02-2021, 19:31
للتاكد من ان التثبيت يعمل بشكل سليم ام لا

قم برفع ملف test.php المرفق فى المرفقات

To test if the extension works, you can run this PHP code:




<?php
$image = new Imagick();
$image->newImage(1, 1, new ImagickPixel('#ffffff'));
$image->setImageFormat('png');
$pngData = $image->getImagesBlob();
echo strpos($pngData, "\x89PNG\r\n\x1a\n") === 0 ? 'Ok' : 'Failed';


وشوف النتيجة الى هتظهر ok ام لا

اذا ظهر خطا 404 وقف .htaccess

المرجع:
https://mlocati.github.io/articles/php-windows-imagick.html

Rise Company
10-02-2021, 19:51
https://youtu.be/l6qCOE9GxEs