Replies: 2 comments
|
Hi @futureweb, We'd love to support it, someone just needs to volunteer to do the work. I don't think it would be difficult, but it would need a little expertise in php server config and testing (which I don't have). |
|
It turns out this already works, with no changes to php-vips — you just have to preload php-vips itself. Under php-vips calls On 2.6.1: // preload.php
require __DIR__ . '/vendor/autoload.php';
interface_exists(\Psr\Log\LoggerInterface::class);
trait_exists(\Psr\Log\LoggerTrait::class);
foreach (glob(__DIR__ . '/vendor/jcupitt/vips/src/*.php') as $file) {
opcache_compile_file($file);
}ffi.enable = preload
opcache.preload = /path/to/preload.phpI checked this on php 7.4.33 with libvips 8.10.5, and on php 8.4.24 with libvips 8.16.1, served over Two caveats. Preload all of And master is stricter than 2.6.1: #287 made #291 fixes that, and adds an Edited to correct the libvips version I tested under php 7.4, to pin the |
Uh oh!
There was an error while loading. Please reload this page.
Hi!
First of all, thanks for the awesome work on php-vips. I would really like to use php-vips 2 on production systems, but the need to enable FFI globally (due to missing preloading support) is a big concern from a security perspective.
I know that if someone already has PHP access, there are already bigger issues, but I’d still like to minimize risks as much as possible -especially on production environments.
Is there any plan to support FFI preloading in the near future, or any ideas on how this limitation might be solved going forward?
Thanks a lot!
All reactions