Skip to content

Commit 854699b

Browse files
committed
try expanding php_info() output
1 parent 3820297 commit 854699b

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ vips extension changelog
33
dev
44
---
55
* Use VIPS_SONAME, if we can
6+
* More stuff in php_info(), see https://github.com/jcupitt/php-vips/issues/32
67

78
Version 1.0.4 (2016-12-30)
89
--------------------------

vips-1.0.4.tgz

437 Bytes
Binary file not shown.

vips.c

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <vips/vips.h>
2020
#include <vips/debug.h>
21+
#include <vips/vector.h>
2122

2223
/* If you declare any globals in php_vips.h uncomment this:
2324
ZEND_DECLARE_MODULE_GLOBALS(vips)
@@ -1727,8 +1728,53 @@ PHP_RSHUTDOWN_FUNCTION(vips)
17271728
*/
17281729
PHP_MINFO_FUNCTION(vips)
17291730
{
1731+
char digits[256];
1732+
17301733
php_info_print_table_start();
17311734
php_info_print_table_header(2, "vips support", "enabled");
1735+
1736+
vips_snprintf(digits, 256, "%d", vips_version(0));
1737+
php_info_print_table_row(2, "Major version", digits);
1738+
vips_snprintf(digits, 256, "%d", vips_version(1));
1739+
php_info_print_table_row(2, "Minor version", digits);
1740+
vips_snprintf(digits, 256, "%d", vips_version(2));
1741+
php_info_print_table_row(2, "Micro version", digits);
1742+
1743+
php_info_print_table_row(2, "SIMD support with liborc",
1744+
vips_vector_isenabled() ? "yes" : "no" );
1745+
1746+
php_info_print_table_row(2, "JPEG support",
1747+
vips_type_find("VipsOperation", "jpegload") ? "yes" : "no" );
1748+
php_info_print_table_row(2, "PNG support",
1749+
vips_type_find("VipsOperation", "pngload") ? "yes" : "no" );
1750+
php_info_print_table_row(2, "TIFF support",
1751+
vips_type_find("VipsOperation", "tiffload") ? "yes" : "no" );
1752+
php_info_print_table_row(2, "GIF support",
1753+
vips_type_find("VipsOperation", "gifload") ? "yes" : "no" );
1754+
php_info_print_table_row(2, "OpenEXR support",
1755+
vips_type_find("VipsOperation", "openexrload") ? "yes" : "no" );
1756+
php_info_print_table_row(2, "load OpenSlide",
1757+
vips_type_find("VipsOperation", "openslideload") ? "yes" : "no" );
1758+
php_info_print_table_row(2, "load Matlab",
1759+
vips_type_find("VipsOperation", "matload") ? "yes" : "no" );
1760+
php_info_print_table_row(2, "load PDF",
1761+
vips_type_find("VipsOperation", "pdfload") ? "yes" : "no" );
1762+
php_info_print_table_row(2, "load SVG",
1763+
vips_type_find("VipsOperation", "svgload") ? "yes" : "no" );
1764+
php_info_print_table_row(2, "FITS support",
1765+
vips_type_find("VipsOperation", "fitsload") ? "yes" : "no" );
1766+
php_info_print_table_row(2, "WebP support",
1767+
vips_type_find("VipsOperation", "webpload") ? "yes" : "no" );
1768+
1769+
php_info_print_table_row(2, "load with libMagick",
1770+
vips_type_find("VipsOperation", "magickload") ? "yes" : "no" );
1771+
1772+
php_info_print_table_row(2, "Text rendering support",
1773+
vips_type_find("VipsOperation", "text") ? "yes" : "no" );
1774+
1775+
php_info_print_table_row(2, "ICC profile support with lcms",
1776+
vips_icc_present() ? "yes" : "no" );
1777+
17321778
php_info_print_table_end();
17331779

17341780
/* Remove comments if you have entries in php.ini

0 commit comments

Comments
 (0)