Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx ngx_cache_purge compatibility Fix nginx-1.11.6+

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by bassie, May 4, 2017.

  1. bassie

    bassie Active Member

    499
    106
    43
    Apr 29, 2016
    Ratings:
    +318
    Local Time:
    10:07 AM
    As Centminmod is using ngx_cache_purge.
    There seems to be a problem with Nginx 1.11.6 and above in association with
    Nginx ngx_cache_purge.
    This patch repairs the compatibility issues.

    Fix compatibility with nginx-1.11.6+ by psulowicz · Pull Request #51 · FRiCKLE/ngx_cache_purge · GitHub

    Code:
    From c7345057ad5429617fc0823e92e3fa8043840cef Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Su=C5=82owicz=20Pawe=C5=82?= <Pawel.Sulowicz@grupaonet.pl>
    Date: Thu, 2 Feb 2017 09:39:37 +0100
    Subject: [PATCH] Fix compatibility with nginx-1.11.6+
    
    ---
     ngx_cache_purge_module.c | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/ngx_cache_purge_module.c b/ngx_cache_purge_module.c
    index 62d3818..fd1ebde 100644
    --- a/ngx_cache_purge_module.c
    +++ b/ngx_cache_purge_module.c
    @@ -492,7 +492,11 @@ typedef struct {
         ngx_str_t                      body_source;
     #  endif /* nginx_version < 1007008 */
     
    +#  if (nginx_version >= 1011006)
    +    ngx_http_complex_value_t      *method;
    +#  else
         ngx_str_t                      method;
    +#  endif /* nginx_version >= 1011006 */
         ngx_str_t                      location;
         ngx_str_t                      url;
     
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    29,041
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,784
    Local Time:
    6:07 PM
    Nginx 1.13.x
    MariaDB 5.5
    Thanks for heads up ! Centmin Mod 123.09beta01 has been updated with patch :)