1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 13ba74317d7a94f87b9d30e6297fb39142c04d36 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 27 Jul 2021 08:35:08 +0200
Subject: [PATCH] Improve phpinfo information - display libmemcached-awesome
when used (since 1.1.1) - display both builtime and runtime versions when
different
---
php_memcached.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/php_memcached.c b/php_memcached.c
index d49cbeb4..0f42a97f 100644
--- a/php_memcached.c
+++ b/php_memcached.c
@@ -4300,7 +4300,22 @@ PHP_MINFO_FUNCTION(memcached)
php_info_print_table_start();
php_info_print_table_header(2, "memcached support", "enabled");
php_info_print_table_row(2, "Version", PHP_MEMCACHED_VERSION);
- php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
+
+#ifdef LIBMEMCACHED_AWESOME
+ if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
+ php_info_print_table_row(2, "libmemcached-awesome headers version", LIBMEMCACHED_VERSION_STRING);
+ php_info_print_table_row(2, "libmemcached-awesome library version", memcached_lib_version());
+ } else {
+ php_info_print_table_row(2, "libmemcached-awesome version", memcached_lib_version());
+ }
+#else
+ if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
+ php_info_print_table_row(2, "libmemcached headers version", LIBMEMCACHED_VERSION_STRING);
+ php_info_print_table_row(2, "libmemcached library version", memcached_lib_version());
+ } else {
+ php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
+ }
+#endif
#ifdef HAVE_MEMCACHED_SASL
php_info_print_table_row(2, "SASL support", "yes");
|