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.so library loading bug comes back with different user #17117

Closed
osevan opened this issue Dec 11, 2024 · 3 comments
Closed

imagick.so library loading bug comes back with different user #17117

osevan opened this issue Dec 11, 2024 · 3 comments

Comments

@osevan
Copy link

osevan commented Dec 11, 2024

Description

im running php always with unprivileged user nginx not with root , you know why, security is important :-)

php -v
PHP 8.4.1 (cli) (built: Dec 10 2024 19:15:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies

root@~/compile/php8.4-build/php-8.4.1/imagick-3.7.0# sudo -u nginx -H php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so: undefined symbol: php_strtolower), /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'brotli.so' (tried: /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so: cannot open shared object file: No such file or directory), /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.4.1 (cli) (built: Dec 10 2024 19:15:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies

PHP Version

php master latest

Operating System

debian sid

@osevan
Copy link
Author

osevan commented Dec 11, 2024

ls -al /root/compile/php8.4-build/php-8.4.1/imagick-3.7.0/modules/
total 616
drwxr-xr-x 2 nginx nginx 4096 Dec 11 02:22 .
drwxr-xr-x 10 root root 4096 Dec 11 02:20 ..
-rwxr-xr-x 1 nginx nginx 621504 Dec 11 02:22 imagick.so

ls -al /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/
total 2080
drwxr-xr-x 2 nginx nginx 4096 Dec 11 02:22 .
drwxr-xr-x 3 nginx nginx 4096 Dec 10 12:48 ..
-rwxr-xr-x 1 nginx nginx 621504 Dec 11 02:22 imagick.so
-rwxr-xr-x 1 nginx nginx 1495760 Dec 10 19:16 opcache.so

@osevan
Copy link
Author

osevan commented Dec 11, 2024

same for brotli.so

:~/compile/php8.4-build/php-8.4.1/imagick-3.7.0# ls -al /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/
total 3284
drwxr-xr-x 2 nginx nginx 4096 Dec 11 02:41 .
drwxr-xr-x 3 nginx nginx 4096 Dec 10 12:48 ..
-rwxr-xr-x 1 nginx nginx 1229208 Dec 10 19:11 brotli.so
-rwxr-xr-x 1 nginx nginx 621504 Dec 11 02:22 imagick.so
-rwxr-xr-x 1 nginx nginx 1495760 Dec 10 19:16 opcache.so

~/compile/php8.4-build/php-8.4.1/php-ext-brotli# php -v
PHP 8.4.1 (cli) (built: Dec 10 2024 19:15:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies

~/compile/php8.4-build/php-8.4.1/php-ext-brotli# sudo -u nginx -H php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so: undefined symbol: php_strtolower), /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'brotli.so' (tried: /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so: undefined symbol: _ZGVeN8v_log2), /opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so.so (/opt/php-8.4/lib/php/extensions/no-debug-non-zts-20240924/brotli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.4.1 (cli) (built: Dec 10 2024 19:15:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies

@cmb69
Copy link
Member

cmb69 commented Dec 11, 2024

Known issue, see Imagick/imagick#690.

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants