Want to subscribe to topics you're interested in?
Become a Member

Nginx Redis invalid condition Beta

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by jcat, Sep 14, 2016.

  1. jcat

    jcat Member

    74
    15
    8
    Jun 21, 2015
    Ratings:
    +31
    Local Time:
    8:17 AM
    Hello,

    Just did a fresh install with WordPress, setting up for redis and getting:

    [[email protected] /]# nginx -t
    nginx: [emerg] invalid condition "!-f" in /usr/local/nginx/conf/php-rediscache.conf:4
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
     
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    36,012
    7,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,181
    Local Time:
    10:17 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    weird it is same setting on line 4 in /usr/local/nginx/conf/php.conf and that works
     
  3. eva2000

    eva2000 Administrator Staff Member

    36,012
    7,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,181
    Local Time:
    10:17 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    oh i see forgot to escape them on setup

    without escaping the cat generated php-rediscache.conf file, you loose the $ character

    in php-rediscache.conf all the instances of $ should exist
    Code (Text):
    location ~ [^/]\.php(/|$) {
      include /usr/local/nginx/conf/503include-only.conf;
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }

    the bug is that without escaping them during php-rediscache.conf creation, all the $ instances would of been removed

    So to manually fix replace 1st 6 lines of file php-rediscache.conf with above version

    Already updated Centmin Mod 123.09beta01 :)
     
    Last edited: Sep 14, 2016
    • Like Like x 1
  4. jcat

    jcat Member

    74
    15
    8
    Jun 21, 2015
    Ratings:
    +31
    Local Time:
    8:17 AM
    Your awesome man, thank you
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    36,012
    7,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,181
    Local Time:
    10:17 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    and thanks for bug report.. one step closer to 123.09beta01 becoming stable :)
     
..