Learn about Centmin Mod LEMP Stack today
Register Now

Install Cache-enabler Error

Discussion in 'Install & Upgrades or Pre-Install Questions' started by omrtozd, Feb 22, 2021 at 7:34 PM.

  1. omrtozd

    omrtozd New Member

    6
    0
    1
    Feb 16, 2021
    Ratings:
    +1
    Local Time:
    1:51 AM
    Hi, every time I follow the full cache enable guide and set up a WordPress website via centmin option 22, I get this error. I don't understand what does it mean.

    Code (Text):
    configure cache-enabler 1.4.9
    Success: Updated 'cache-enabler' option.
    Success: Updated 'cache-enabler' option.
    "\/^fbclid|epik|klaviyo|ref|mc_(cid|eid)|utm_(source|medium|campaign|term|content|expid)|gclid|fb_(action_ids|action_types|source)|age-verified|ao_noptimize|usqp|cn-reloaded|_ga|_ke$\/"
    Error: Could not get 'cache_enabler' option. Does it exist?
    

    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.6
    • PHP Version Installed: 7.4.15
    • MariaDB MySQL Version Installed: 10.3.27
    • When was last time updated Centmin Mod code base ? : 2/22/2021
    • Persistent Config:
      Code (Text):
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      NGINX_STAPLE_CACHE_OVERRIDE='y'
      NGINX_STAPLE_CACHE_TTL='86400'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      SELFSIGNEDSSL_ECDSA='y'
      NGINX_ZERODT='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      PHP_PGO_ALWAYS='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      PHPFINFO='y'
      WPCLI_CE_QUERYSTRING_INCLUDED='y'
      MARCH_TARGETNATIVE='n'
      

     
  2. eva2000

    eva2000 Administrator Staff Member

    46,179
    10,499
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,278
    Local Time:
    8:51 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    notice underscore versus dash for cache-enabler vs cache_enabler. Cache Enabler 1.4.9 uses cache-enabler while >1.4.9 like 1.5+ uses cache_enabler with underscore. Centmin Mod centmin.sh menu option 22 should auto detect which version of Cache Enabler is used and refer to the appropriate option.

    what output do you get from the following commands' outputs, replacing vhost variable with your Wordpress nginx vhost domain name
    Code (Text):
    vhost=domain.com
    wp option get cache_enabler --format=json --allow-root --path=/home/nginx/domains/$vhost/public/| jq
    

    then
    Code (Text):
    vhost=domain.com
    wp option get cache-enabler --format=json --allow-root --path=/home/nginx/domains/$vhost/public/| jq
    

    then
    Code (Text):
    vhost=domain.com
    wp option pluck cache-enabler incl_parameters --format=json --allow-root --path=/home/nginx/domains/$vhost/public/
    

    then
    Code (Text):
    vhost=domain.com
    wp option pluck cache_enabler excluded_query_strings --format=json --allow-root --path=/home/nginx/domains/$vhost/public/
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    46,179
    10,499
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,278
    Local Time:
    8:51 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Actually think I found the issue, centmin.sh menu option 22 didn't auto detect 1.4.9 vs 1.5+ for all WP CLI commands - I missed one so that is probably the one you got an error on as the specific command referred only to cache_enabler option for 1.5+ and not 1.49's cache-enabler but it is only cosmetic error as the command is just to display the options so no need to worry, your install is fine.

    Incorrect command is just referencing 1.5+ variable
    Code (Text):
      if [ -f /usr/bin/jq ]; then
        \wp option get cache_enabler --format=json --allow-root | jq
      else
        \wp option get cache_enabler --format=json --allow-root
      fi
    

    when I should use
    Code (Text):
      if [ -f /usr/bin/jq ]; then
        if [[ "$get_ce_version" -le '1004009' ]]; then
          \wp option get cache-enabler --format=json --allow-root | jq
        else
          \wp option get cache_enabler --format=json --allow-root | jq
        fi
      else
        if [[ "$get_ce_version" -le '1004009' ]]; then
          \wp option get cache-enabler --format=json --allow-root
        else
          \wp option get cache_enabler --format=json --allow-root
        fi
      fi
    

    will update 123.09beta01 to add the fix in next few minutes