Imagick / imagick

🌈 The Imagick PHP extension 🌈
http://pecl.php.net/imagick
Other
549 stars 141 forks source link

Can't figure out how to compile imagick for openlitespeed/litespeed enterprise server for wordpress Ubuntu #649

Open WillSARCats opened 9 months ago

WillSARCats commented 9 months ago

I'm so new to coding and can't figure this out. Any help would be appreciated and I can test ideas put foward.

Openlitespeed server and I want to install ImageMagick version 7 for wordpress to allow AVIF converting. The current lsrepo installs imagick 3.7.0 compiled with Image Magick 6.9

I could get ImageMagick installed easily enough (code below), how to I reinstall/manually compile lsphp-81 with the new ImageMagick version 7? Every effort still comes up compiled with 6.9.

//IMEI one-step ImageMagic version 7 install: https://github.com/SoftCreatR/imei (worked) t=$(mktemp) && \ wget 'https://dist.1-2.dev/imei.sh' -qO "$t" && \ bash "$t" && \ rm "$t"

//Manually compiling imagick, but I don't think this applies to the litespeed server? (didn't achieve litespeed server compiling from version 7) git clone https://github.com/Imagick/imagick cd imagick phpize && ./configure make make install

//I played around making this not understanding what I was doing. It didn't work. git clone https://github.com/Imagick/imagick.git /usr/local/lsws/lsphp81/bin/phpize ./configure --with-imagick=/usr/local/lsws/lsphp81 make make install touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt systemctl restart lsws

Danack commented 9 months ago

//Manually compiling imagick, git clone https://github.com/Imagick/imagick.git

For the record, the only releases I support are the releases made through https://pecl.php.net/package/imagick

I do occasionally screw up code in this repo, and so building from here is, perhaps more exciting than one might hope.

Manually compiling imagick, but I don't think this applies to the litespeed server?

Well, you need to compile the extension code, so that the litespeed server can use it.

What I'd suggest doing is finding out where the current imagick.so file is for the litespeed server. You might be able to do that by running the command find / -name imagick.so

That would allow you to see where the file needs to be. I'd suggest moving the current file out the way, mv imagick.so imagick.so.bak and then just copying the file you built into the directory.

Though it is also possible to tell the configure tool where you want the built files to be installed to:

./configure \
  --prefix=/usr/local/lsws/lsphp81 \
  --exec-prefix=/usr/local/lsws/lsphp81

btw, this is probably wrong:

./configure --with-imagick=/usr/local/lsws/lsphp81

I believe the --with-imagick is meant to point to the directory where ImagickMagick was installed to, so that you can tell Imagick explicitly where to look for it.

WillSARCats commented 9 months ago

I actually got a code suggestion on the openlitespeed forum if you go to the Linux Ubuntu section. im going to test it in a vm later today.

On 9 Feb 2024 at 09:07, Danack @.***> wrote:

//Manually compiling imagick, git clone https://github.com/Imagick/imagick.git

For the record, the only releases I support are the releases made through https://pecl.php.net/package/imagick

I do occasionally screw up code in this repo, and so building from here is, perhaps more exciting than one might hope.

Manually compiling imagick, but I don't think this applies to the litespeed server?

Well, you need to compile the extension code, so that the litespeed server can use it.

What I'd suggest doing is finding out where the current imagick.so file is for the litespeed server. You might be able to do that by running the command find / -name imagick.so

That would allow you to see where the file needs to be. I'd suggest moving the current file out the way, mv imagick.so imagick.so.bak and then just copying the file you built into the directory.

Though it is also possible to tell the configure tool where you want the built files to be installed to:

./configure \ --prefix=/usr/local/lsws/lsphp81 \ --exec-prefix=/usr/local/lsws/lsphp81

btw, this is probably wrong:

./configure --with-imagick=/usr/local/lsws/lsphp81

I believe the --with-imagick is meant to point to the directory where ImagickMagick was installed to, so that you can tell Imagick explicitly where to look for it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>