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

Imagick extension stopped working #104

Closed
chekalsky opened this issue Nov 25, 2020 · 19 comments · Fixed by #118
Closed

Imagick extension stopped working #104

chekalsky opened this issue Nov 25, 2020 · 19 comments · Fixed by #118

Comments

@chekalsky
Copy link
Contributor

chekalsky commented Nov 25, 2020

Couple of days ago imagick extension I've used stopped working. I thought it was connected to #99 but apparently it's not.

I've made very simple bref app to demonstrate it.
https://github.com/chekalsky/bref-imagick-issue

image

Error:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/bref-extra/imagick.so' (tried: /opt/bref-extra/imagick.so (libgomp.so.1: cannot open shared object file: No such file or directory), /opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/imagick.so.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

@danniehansen
Copy link

Not sure if it's related. Also experiencing exactly the same with GD after upgrading to Bref 1.0 and added GD layer / ini.

@jenschude
Copy link
Contributor

Btw there was once a test added to bref itself if extensions are loadable. This could help and prevent such issues in the future. ;)

See https://github.com/brefphp/bref/blob/master/runtime/layers/tests.php

@hvipana
Copy link

hvipana commented Nov 26, 2020

Not sure if it's related. Also experiencing exactly the same with GD after upgrading to Bref 1.0 and added GD layer / ini.

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/bref-extra/gd.so' (tried: /opt/bref-extra/gd.so (libpng12.so.0: cannot open shared object file: No such file or directory), /opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/gd.so.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

@chekalsky
Copy link
Contributor Author

chekalsky commented Nov 26, 2020

+ #109
probably connected

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 26, 2020

@chekalsky Are you using Bref 1.0?

If so, all the issues should be solved in 0.6.4 (will be released today)

@chekalsky
Copy link
Contributor Author

@Nyholm yes, thank you!

@gocebo
Copy link

gocebo commented Nov 26, 2020

Just updated to 0.6.4 + bref 1.0.0 and still getting PHP Startup: Unable to load dynamic library '/opt/bref-extra/imagick.so'

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 26, 2020

Thank you. Do you get any other error output?

@gocebo
Copy link

gocebo commented Nov 26, 2020

The same one as @chekalsky
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/bref-extra/imagick.so' (tried: /opt/bref-extra/imagick.so (libgomp.so.1: cannot open shared object file: No such file or directory), /opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/imagick.so.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 26, 2020

I've done some work in #111. I test run all extensions, I found issues in GD but I cannot reproduce for the Imagick extension.

Hm...

@hvipana
Copy link

hvipana commented Nov 27, 2020

I have updated to 0.6.4 and gd is still not working.

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/bref-extra/gd.so' (tried: /opt/bref-extra/gd.so (libpng15.so.15: cannot open shared object file: No such file or directory), /opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/gd.so.so (/opt/bref/lib/php/extensions/no-debug-non-zts-20190902//opt/bref-extra/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

image

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 27, 2020

Thank you @hvipana

I added some work and tests to this last night. We are not making sure that the extension is loaded properly. See #111.
I am currently preparing a new release.

What I find interesting is that some layers reported issues. But imagick isn't one of them... however, GD is fixed and gmp is fixed in 0.6.4 according to #109

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 27, 2020

I've just released 0.7.0: https://github.com/brefphp/extra-php-extensions/releases/tag/0.7.0

The test repo that @chekalsky works. Here is a PR:
chekalsky/bref-imagick-issue#1

Note that you no longer have to add: extension=/opt/bref-extra/imagick.so

@Nyholm Nyholm closed this as completed Nov 27, 2020
@chekalsky
Copy link
Contributor Author

@Nyholm Thank you, imagick is working now, but for some reason there is no support of PNG and JPG:

image

Updated https://github.com/chekalsky/bref-imagick-issue so you can check. Do you want me to create a new issue about it?

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 27, 2020

Thank you

@Nyholm Nyholm reopened this Nov 27, 2020
@Nyholm
Copy link
Collaborator

Nyholm commented Nov 27, 2020

Could you update this test file: https://github.com/brefphp/extra-php-extensions/blob/master/layers/imagick/test.php?

I want it to make sure that imagick is installed properly. You dont need to fix the docker image, just write some PHP that checks if png and jpg is supported.

layer=imagick php_versions=74 make test

@chekalsky
Copy link
Contributor Author

@Nyholm yep, https://github.com/brefphp/extra-php-extensions/runs/1463539675?check_suite_focus=true

@Nyholm
Copy link
Collaborator

Nyholm commented Nov 27, 2020

Tests are added, @chekalsky updated the image to support png and jpg, and I've just tagged 0.7.1.

Everything should be working now and never ever fail again thanks to the tests =)

@chekalsky
Copy link
Contributor Author

chekalsky commented Nov 27, 2020

Everything works fine!

image

@Nyholm thank you for the fast reaction, you are awesome!

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

Successfully merging a pull request may close this issue.

6 participants