libvips / php-vips

php binding for libvips
MIT License
615 stars 25 forks source link

libvips.so.42 not found in correct path #201

Closed ganicus closed 1 year ago

ganicus commented 1 year ago

Here is the location of my libvips.so.42:

sudo find / -name "libvips.so.42" /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/local/lib/libvips.so.42

I keep getting this error:

Uncaught Jcupitt\Vips\Exception: Unable to find library 'libvips.so.42' in any of ['/usr/local/lib64/', '/usr/local/lib/']. Make sure that you've installed libvips and that 'libvips.so.42' is on your system's library search path. in /var/www/html/vendor/jcupitt/vips/src/FFI.php:261

My php info output:

vips property value
Vips headers version 8.13.3
Vips library version 8.13.3
Vips ABI version 57.3.15

What's not happening here?

ganicus commented 1 year ago

Could this be related to #178

ganicus commented 1 year ago

My apologies - my apache FFI ini settings had FFI to "preloaded" and not "enabled" which prevented the library from loading.

I would suggest changing FFI.php line 256 from:

Utils::debugLog("init", ["msg" => "library load failed", "exception" => $e]);

to:

Utils::debugLog("init", ["msg" => "library load failed", "exception" => $e->getMessage()]);

It currently returns an empty exemption object instead of the error message.

jcupitt commented 1 year ago

Ooop! Good idea, thanks.

jcupitt commented 1 year ago

... I put in your fix and credited you in the CHANGELOG, I hope that's OK.

ganicus commented 1 year ago

Been working perfectly since I updated the FFI settings. Thank you!