`ffi.enable` check incorrect, default value passes it, even if not enabled
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 58/100
Research direction
Review src/FFI.php around line 284 and the ini_get('ffi.enable') result described in the issue. Verify the completed fix treats only an actual true value as enabled, while preload does not bypass the restriction.
Written by the indexing model from the issue text.
Description
Was trying to resolve why I kept getting this error, even though I was certain that I installed the extension properly:
Unable to open library 'libvips.42.dylib' in any of ['/opt/homebrew/lib/']. Make sure that you've installed libvips and that 'libvips.42.dylib' is on your system's library search path.
So I added a debugger and the actual error being thrown was: FFI API is restricted by "ffi.enable" configuration directive.
Since ini_get('ffi.enable') returns preload instead of false it passes the following check:
https://github.com/libvips/php-vips/blob/6dbba1bb3a4ba1e39edb71016a2aa6da5bff32ee/src/FFI.php#L284
This is incorrect and should be changed to check for an actual true.
- Dominant language
- PHP
- Stars
- 721
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libvips/php-vips
-
Add MacPorts support Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Color Quantization Open
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in libvips/php-vips
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·