Closed
Description
PHP Version: 8.1.3
PHP ini: ffi.enable=true
Also true for php -i
Framework: Laravel 9.4.1
Environment: WSL 2 Docker
Docker OS: Ubuntu-20.04
libvips-dev
: 8.10.5-2ubuntu1
jcupitt/vips
: v2.0.0
I'm receiving this error in my console, while trying to run the below code.
(.:21): GLib-GObject-CRITICAL **: 22:13:34.813: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
$image = \Jcupitt\Vips\Image::newFromFile(resource_path('HQ-Heidi.png'));
$width = $image->width;
$height = $image->height;
It is repeating very fast and also I have to stop PHP, because the request runs for too long.
Edit:
The beginning of the logs
(.:22): GLib-GObject-WARNING **: 22:20:57.385: cannot register existing type 'VipsObject'
(.:22): GLib-CRITICAL **: 22:20:57.385: g_once_init_leave: assertion 'result != 0' failed
(.:22): GLib-GObject-CRITICAL **: 22:20:57.385: g_type_register_static: assertion 'parent_type > 0' failed
(.:22): GLib-CRITICAL **: 22:20:57.385: g_once_init_leave: assertion 'result != 0' failed
EDIT: FIXED
I fixed it by installing the pecl extension for vips
sudo pecl install vips
# Add vips.so to your php.ini
sudo echo 'extension="vips.so"' > /etc/php/8.1/cli/conf.d/20-vips.ini
I will let this issue stay open, either this should be documented or there should be a fix?
Metadata
Metadata
Assignees
Labels
No labels