Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VC16 build for windows pecl #573

Open
N6REJ opened this issue Dec 14, 2022 · 100 comments
Open

VC16 build for windows pecl #573

N6REJ opened this issue Dec 14, 2022 · 100 comments

Comments

@N6REJ
Copy link

N6REJ commented Dec 14, 2022

I'm looking for an updated build for https://windows.php.net/downloads/pecl/deps/ImageMagick-7.1.0-18-vc15-x86.zip that uses vc16 & x64. Where can I find such a thing or create one?

@terax6669
Copy link

8.2.1 is around the corner and still no build :C I've been waiting for weeks...
I found this: https://wiki.php.net/internals/windows/stepbystepbuild if you manage to build a DLL before one appears on pecl please share.

@Danack
Copy link
Collaborator

Danack commented Dec 15, 2022

@terax6669 wrote:

:C

What does ":C" mean? I don't speak emoji.

@Danack
Copy link
Collaborator

Danack commented Dec 15, 2022

@N6REJ I've actually never been involved in building any extensions for Windows, and I'm not a Windows user.

Reading the front page of https://windows.php.net/ I can see:

Missing PECL DLLs
17 Oct 2022

You may have already noticed that DLLs for new PECL releases are no longer available for several months. This is because the Windows PECL build machine died, and the team is still working on the long term plan of building DLLs for PECL extensions with a new CI process. We're doing our best to finish that as soon as possible, and keep you up to date.

Which is certainly unfortunate.

I will try to find out what the situation is. For the record, I personally think getting the windows builds available again is something that would be appropriate for the PHP Foundation to be hiring someone to work on full time.

@N6REJ
Copy link
Author

N6REJ commented Dec 15, 2022

it would be great if you could expedite it. We've got every version of imagemick since php 8.0 not working because of it.

@N6REJ
Copy link
Author

N6REJ commented Dec 28, 2022

if you want, teach me how to do it and i'll make the imagick ones myself

@Danack
Copy link
Collaborator

Danack commented Dec 29, 2022

if you want, teach me how to do it and i'll make the imagick ones myself

I don't know, I've never compiled Imagick on windows.

If anyone wants to write some instructions, I could host them on phpimagick.com

btw, https://mlocati.github.io/articles/php-windows-imagick.html exists and may be of help to some people.

@tmb-github
Copy link

Sigh, the latest version provided on that page, for 8.1, doesn't work for 8.2. Using PHP 8.2 and following those instructions for 8.1, I get the expected mismatch error:

[29-Dec-2022 17:35:22 UTC] PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20220829
These options need to match
in Unknown on line 0

@WilliamStam
Copy link

thanks @Danack for all your work. waiting patiently for that server to come up hehe

@terax6669
Copy link

Any update on this?

1 similar comment
@fedot199614
Copy link

Any update on this?

@ArthurPatriot
Copy link

ArthurPatriot commented Feb 15, 2023

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip
ext-imagick-php8.2-nts-x64.zip

@N6REJ
Copy link
Author

N6REJ commented Feb 15, 2023

Thats fantastic!

@fedot199614
Copy link

what about nts?

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS

ext-imagick-php8.2-ts-x64.zip

greate, but what about nts?

@ArthurPatriot
Copy link

ArthurPatriot commented Feb 16, 2023

I had to go through 9 rings of hell to make this build without any instructions or tips... If you really need it, I can make another build, for NTS...) You can download here - #573 (comment)

@fedot199614
Copy link

fedot199614 commented Feb 17, 2023

I had to go through 9 rings of hell to make this build without any instructions or tips... If you really need it, I can make another build, for NTS...) You can download here - #573 (comment)

thanks so much. Will try your build. Also found this great guide and planning use it https://jite.eu/_posts/2021-02-21-imagick-on-php8/

UPD: works for me, thx

@tmb-github
Copy link

tmb-github commented Feb 19, 2023

The thread-safe version (the one I need) will not work on my system (Win11, XAMPP, with PHP 8.2). I suspect it's because the version of ImageMagick I have installed locally (ImageMagick-7.1.0-18-vc15-x64/ImageMagick 7.1.0-18 Q16 x64) is different than the version the builds above were compiled against.

@ArthurPatriot, which version of ImageMagick did you compile those builds against?

@ArthurPatriot
Copy link

The thread-safe version (the one I need) will not work on my system (Win11, XAMPP, with PHP 8.2). I suspect it's because the version of ImageMagick I have installed locally (ImageMagick-7.1.0-18-vc15-x64/ImageMagick 7.1.0-18 Q16 x64) is different than the version the builds above were compiled against.

@ArthurPatriot, which version of ImageMagick did you compile those builds against?

All libraries included on zip. You can use latest version of Imagick for Windows.

@tmb-github
Copy link

@ArthurPatriot Which version of ImageMagick is installed on the machine where you compiled Imagick?

@ArthurPatriot
Copy link

@ArthurPatriot Which version of ImageMagick is installed on the machine where you compiled Imagick?

All required libraries exists in zip.
ImageMagick-7.1.0-62-Q16-HDRI-x64

@tmb-github
Copy link

@ArthurPatriot Success! Thanks so much!!!

@pro81723
Copy link

Is this working for Debian Linux? php 8.2

@ArthurPatriot
Copy link

ArthurPatriot commented Feb 21, 2023

@pro81723

sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2-imagick

@Rentner2
Copy link

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

PHP 8.2.3 x64 TS

Works for me, W11 + XAMPP with PHP 8.2, Thanks!

@Qara-Penimah
Copy link

Is there an official release?

@N6REJ
Copy link
Author

N6REJ commented Apr 3, 2023

when I compare the ts to whats on pecl repo there is a LOT missing. I'm unsure what to do.

@WilliamStam
Copy link

WilliamStam commented Apr 4, 2023

it works for everything i need it to do. doesnt error out. are there any issues with the differences? otherwise i wouldnt worry too much i think

edit: NTS here so that might be less of an issue than TS version i suppose

@ArthurPatriot
Copy link

TS here so that might be less of an issue than TS version i suppose

all must works

@Asmitta-01
Copy link

Asmitta-01 commented May 5, 2023

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

It appears in the "php -m" result but not in the phpinfo.

PS C:\xampp\htdocs\...> php  --ri imagick

imagick

imagick module => enabled
imagick module version => @PACKAGE_VERSION@
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 7.1.0-62 Q16-HDRI x64 32ce406:20230212 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 7.1.0-62 Q16-HDRI x64 32ce406:20230212 https://imagemagick.org
ImageMagick copyright => (C) 1999 ImageMagick Studio LLC
ImageMagick release date => 2023-02-12
ImageMagick number of supported formats:  => 0

Directive => Local Value => Master Value
imagick.locale_fix => 0 => 0
imagick.skip_version_check => 0 => 0
imagick.progress_monitor => 0 => 0
imagick.set_single_thread => 1 => 1
imagick.shutdown_sleep_count => 10 => 10
imagick.allow_zero_dimension_images => 0 => 0

@ELFswe
Copy link

ELFswe commented May 13, 2023

@ArthurPatriot
Any possibillity of a lighter guide for wich rings of hell you went through to build this?

@danielscsc
Copy link

danielscsc commented Nov 28, 2023

Can you build imagick for PHP 8.2.12 NTS?

The extension compiled for PHP 8.2.11 should work with any 8.2.* release.

@Geckosan Thank you very much, this works! Only thing I noticed - when running php -v I get:

PHP Warning:  Version warning: Imagick was compiled against ImageMagick version 1809 but version 1808 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

Warning: Version warning: Imagick was compiled against ImageMagick version 1809 but version 1808 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
PHP 8.2.12 (cli) (built: Oct 24 2023 21:15:15) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies

EDIT:

Turns out I just had to uninstall the ImageMagick I had installed locally on my machine. Once I did that, no more warning messages in php -v.

@bally86
Copy link

bally86 commented Jan 4, 2024

Where can I find the ImageMagick 7.1.1-19 Q16-HDRI x64 installer?

@danielscsc
Copy link

Where can I find the ImageMagick 7.1.1-19 Q16-HDRI x64 installer?

I'm not sure you need that exact version, but if you do:
https://imagemagick.org/archive/binaries/

@bally86
Copy link

bally86 commented Jan 4, 2024

Where can I find the ImageMagick 7.1.1-19 Q16-HDRI x64 installer?

I'm not sure you need that exact version, but if you do: https://imagemagick.org/archive/binaries/

I only see 7.1.1-25 there. Can I just use that one?

@danielscsc
Copy link

Where can I find the ImageMagick 7.1.1-19 Q16-HDRI x64 installer?

I'm not sure you need that exact version, but if you do: https://imagemagick.org/archive/binaries/

I only see 7.1.1-25 there. Can I just use that one?

I would think so. Can't hurt to try :) Let us know!

@bally86
Copy link

bally86 commented Jan 5, 2024

Where can I find the ImageMagick 7.1.1-19 Q16-HDRI x64 installer?

I'm not sure you need that exact version, but if you do: https://imagemagick.org/archive/binaries/

I only see 7.1.1-25 there. Can I just use that one?

I would think so. Can't hurt to try :) Let us know!

7.1.1-25 seems to work fine!

@nandamrbn
Copy link

Thanks Working for me(PHP 8.2.12)

@Duber79
Copy link

Duber79 commented Jan 11, 2024

It didn't work for me, PHP 8.2.9 (NTS).
Error loading the extension(

@joakim-tldr
Copy link

Hi, I've done a recent imagick build for php 8.2 windows x64 after I had issues getting the previous build posted here from working (0 supported file types, mismatched versions etc), I'm attaching here in case its useful to anybody. Obviously, use at your own risk.

Built using PHP 8.2.11 vs16 x64, ImageMagick 7.1.1-19 Q16-HDRI vs16 x64 (Dynamic Multi-threaded DLL version), and imagick 3.7.0.

I've set the module version to 3.7.0 (which looking at the source I'm probably not supposed to do) so stuff that checks the version should be ok.

Both TS and NTS versions are included (just copy the right version of the dll to your php/ext folder and rename it to php_imagick.dll). Add the unzipped folder to your windows system path and you should be good to go.

Edit dropped ImageMagick version to 7.1.1-19 instead of the beta version. imagick-php8211-phpinfo php_imagick_3.7.0-php_8.2-vs16-x64.zip

Thank you! Can confirm php_imagick_ts work for any PHP 8.2.* with ImageMagick 7.1.1-19 Q16-HDRI vs16 x64 (Dynamic Multi-threaded DLL version), and imagick 3.7.0, added it to several machines.

@christoferd
Copy link

Is there a dll for imagick for PHP 8.24 VS16 x64 TS?
Or, any of the later PHP 8 releases?

@lija0905
Copy link

Bless this thread. I've lost so many hours on this installation. Only information from here helped me!!!!

@ayuniptrii2
Copy link

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

It works. thanks. i've searched the pecl web but it's still up to php 8.1

@ben-norton
Copy link

ben-norton commented Mar 22, 2024

PHP 8.3 version?

@johnzoet
Copy link

johnzoet commented Apr 3, 2024

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

Working for me.
Installed ImageMagick DLL with higher version. Tested and working.
Further, I copied all DLL files from imagick zip file to a folder and added that folder to the system environment path.
One caveat I encountered is that phpinfo.php did not have ImageMagick on the system path. Restarting Xampp solved this problem.

@N6REJ
Copy link
Author

N6REJ commented Apr 6, 2024

I'd like to offer to make a repo where y'all can contribute and we can actually have releases. I think it would be good to have imagemagick and imagick both under one repo so we can keep things up to date and easy to find. I'd like y'alls feedback on this. We're posting releases in this thread but not under releases which makes them hard to find.

@Rentner2
Copy link

Rentner2 commented Apr 6, 2024

I think it's a good idea. Go on!

@ArthurPatriot
Copy link

I'd like to offer to make a repo where y'all can contribute and we can actually have releases. I think it would be good to have imagemagick and imagick both under one repo so we can keep things up to date and easy to find. I'd like y'alls feedback on this. We're posting releases in this thread but not under releases which makes them hard to find.

PECL windows builder is broken. So you will get same story for all extensions.

I am planning to write simple service which build required extension for requested php version... On same way as pecl. What you think guys?)

@N6REJ
Copy link
Author

N6REJ commented Apr 6, 2024

I'd like to offer to make a repo where y'all can contribute and we can actually have releases. I think it would be good to have imagemagick and imagick both under one repo so we can keep things up to date and easy to find. I'd like y'alls feedback on this. We're posting releases in this thread but not under releases which makes them hard to find.

PECL windows builder is broken. So you will get same story for all extensions.

I am planning to write simple service which build required extension for requested php version... On same way as pecl. What you think guys?)

PLEASE DO!!!

@ArthurPatriot
Copy link

@ArthurPatriot
Copy link

@ArthurPatriot
Copy link

Is there a dll for imagick for PHP 8.24 VS16 x64 TS? Or, any of the later PHP 8 releases?

https://phpext.phptools.online/extension/images/imagick-121

@CopaceticMeatbag
Copy link

Provisional build for windows PHP 8.3. Both TS & NTS versions are included in the zip. I'm not in a position check this right now, so please test thoroughly before use.

Unzip to a location of your choice. Add the unzipped directory to your windows system path (make sure it comes before any previously installed versions of ImageMagick). Copy either php_imagick_ts.dll or php_imagick_nts.dll (depending on your PHP version) to your php/ext directory and rename to php_imagick.dll. Enable the extension in php.ini and run phpinfo to check it's working. php_imagick_3.7.0-php_8.3-vs16-x64.zip

Confirmed this worked without any issues using the latest "7.1.1-32 Q16-HDRI vs16 x64" installer and PHP 8.3.6. Many thanks!!

@fmonts
Copy link

fmonts commented Jun 10, 2024

The official PECLs for 8.2 and 8.3 are now released

https://mlocati.github.io/articles/php-windows-imagick.html

The issue can be considered closed

@numen111104
Copy link

Provisional build for windows PHP 8.3. Both TS & NTS versions are included in the zip. I'm not in a position check this right now, so please test thoroughly before use.

Unzip to a location of your choice. Add the unzipped directory to your windows system path (make sure it comes before any previously installed versions of ImageMagick). Copy either php_imagick_ts.dll or php_imagick_nts.dll (depending on your PHP version) to your php/ext directory and rename to php_imagick.dll. Enable the extension in php.ini and run phpinfo to check it's working. php_imagick_3.7.0-php_8.3-vs16-x64.zip

THANKSS SO MUCCH IT'S WORK TO MEEE

@zhoumann
Copy link

Any chance of a PHP 8.4 build? Not sure when/if the official PECL package is going to have a PHP 8.4 DLL hook for imagick.

@fmonts
Copy link

fmonts commented Feb 4, 2025

Any chance of a PHP 8.4 build? Not sure when/if the official PECL package is going to have a PHP 8.4 DLL hook for imagick.

8.4 official PECL is available!

https://pecl.php.net/package/imagick/3.7.0/windows

Working fine to me

@bally86
Copy link

bally86 commented Feb 6, 2025

Any chance of a PHP 8.4 build? Not sure when/if the official PECL package is going to have a PHP 8.4 DLL hook for imagick.

8.4 official PECL is available!

https://pecl.php.net/package/imagick/3.7.0/windows

Working fine to me

I downloaded this version, but when I run php --version it returns:

Warning: Version warning: Imagick was compiled against ImageMagick version 1808 but version 1809 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
PHP 8.4.3 (cli) (built: Jan 15 2025 11:02:41) (NTS Visual C++ 2022 x64)

Do I need a other version of ImageMagick? Currently i'm using:
ImageMagick 7.1.1-43 Q16-HDRI x64 a2d96f4:20241222

@fmonts
Copy link

fmonts commented Feb 6, 2025

I didn't install ImageMagick separately, I extracted the dlls that are inside the zip, to a folder that's added to the path:

Image

@bally86
Copy link

bally86 commented Feb 6, 2025

Thanks for your fast reply, I will give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests