Skip to content

libvips info in phpinfo() #32

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

Closed
kleisauke opened this issue Feb 12, 2017 · 4 comments
Closed

libvips info in phpinfo() #32

kleisauke opened this issue Feb 12, 2017 · 4 comments

Comments

@kleisauke
Copy link
Member

To check which version of libvips we're running and which loaders are currently enabled, it would be nice to have some more info about the current vips setup in phpinfo().

For example this is what the GD extension on our server displays:
gd-phpinfo
(Extension source can be found here)

For the vips extension we could do something like this:
vips-phpinfo
(Approximately the same as what you see if you build libvips. I think some info is unnecessary)

@jcupitt
Copy link
Member

jcupitt commented Feb 18, 2017

Here's the equivalent code in php-vips-ext:

https://github.com/jcupitt/php-vips-ext/blob/master/vips.c#L1728

It could certainly be expanded, I agree. Let's tag this as an enhancement.

@jcupitt
Copy link
Member

jcupitt commented Feb 19, 2017

I had a quick hack in this branch:

https://github.com/jcupitt/php-vips-ext/tree/better-php-info

php -i now shows:

vips

vips support => enabled
Major version => 8
Minor version => 5
Micro version => 0
SIMD support with liborc => yes
JPEG support => yes
PNG support => yes
TIFF support => yes
GIF support => yes
OpenEXR support => yes
load OpenSlide => yes
load Matlab => yes
load PDF => yes
load SVG => yes
FITS support => yes
WebP support => yes
load with libMagick => yes
Text rendering support => yes
ICC profile support with lcms => yes

libvips doesn't track the versions of libraries it uses, so yes/no is all we can say at the moment. Is that enough?

@kleisauke
Copy link
Member Author

I think this will be enough for now. We can expand the info in the future (like environment variables such as VIPS_DISC_THRESHOLD or current cache/concurrency settings). Versions of libraries that libvips uses is maybe unnecessary.

Outside the scope of this enhancement, but a nice feature to have, is to change libvips/php-vips settings in the php.ini (like GD does). Not sure how difficult this is to implement.

@jcupitt
Copy link
Member

jcupitt commented Feb 19, 2017

OK, merged to master. Thanks!

Yes, make another enhancement for settings in php.ini.

@jcupitt jcupitt closed this as completed Feb 19, 2017
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