• I am working on setting up a config on AWS Elastic Beanstalk but I am having trouble getting any redis plugin to detect my redis client. I did read your first post and I agree this probably isn’t you’re plugin, I am wondering if you / anyone else has had this sort of issue or where I might get help with it if this is the wrong place.

    NAME="Amazon Linux AMI"
    VERSION="2018.03"
    ID="amzn"
    ID_LIKE="rhel fedora"
    VERSION_ID="2018.03"
    PRETTY_NAME="Amazon Linux AMI 2018.03"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
    HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
    

    redis.config

    commands:
      01_redis_install:
        # run this command from /tmp directory
        cwd: /tmp
        # don't run the command if phpredis is already installed (file /etc/php.d/redis.ini exists)
        test: '[ ! -f /etc/php.d/redis.ini ] && echo "phpredis extension not installed"'
        # executed only if test command succeeds
        command: |
          wget https://github.com/phpredis/phpredis/archive/4.1.1.zip -O phpredis.zip \
          && unzip -o phpredis.zip \
          && cd phpredis-* \
          && phpize \
          && ./configure \
          && make \
          && make install \
          && echo extension=redis.so > /etc/php.d/redis.ini \
          && service httpd restart
      02_kill_old_stunnel:
        test: 'pgrep -u root stunnel && echo "There are existing stunnel process"'
        command: sudo pkill stunnel
    
      03_start_stunnel:
        command: sudo stunnel /etc/stunnel/redis.conf
    
    packages:
      yum:
        stunnel: []
    
    files:
      "/etc/stunnel/redis.conf":
        mode: "000644"
        owner: root
        group: root
        content: |
          fips = no
          setuid = root
          setgid = root
          pid = /var/run/stunnel.pid
          debug = 7
          options = NO_SSLv2
          [redis-cli]
            client = yes
            accept = 127.0.0.1:6379
            connect = master.xxxxxxcache.amazonaws.com:6379

    Diagnostics

    
    Status: Not Connected
    Client: Predis (v1.1.1)
    Drop-in: Valid
    Ping: PONG
    Redis Extension: Not Found
    Predis Client: 1.1.1
    PHP Version: 7.2.8
    Multisite: No
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_DISABLED: ""
    WP_REDIS_CLIENT: "pecl"
    WP_REDIS_SCHEME: "tcp"
    WP_CACHE_KEY_SALT: ""
    WP_REDIS_PASSWORD: "*****************"
    Global Groups: ["blog-details","blog-id-cache","blog-lookup","global-posts","networks","rss","sites","site-details","site-lookup","site-options","site-transient","users","useremail","userlogins","usermeta","user_meta","userslugs"]
    Ignored Groups: ["counts","plugins","blog-details","blog-id-cache","blog-lookup","global-posts","networks","rss","sites","site-details","site-lookup","site-options","site-transient","users","useremail","userlogins","usermeta","user_meta","userslugs","themes"]
    Dropins: 
     - Redis Object Cache Drop-In v1.3.8 by Till Krüss
    Plugins: 
    # php -m | grep redis
    redis

    Running the following PHP file, with proper auth results in a +PONG

    <?php
    
    $redis = new Redis();
    
    $redis->connect('localhost', 6379);
    $redis->auth('5xxxxxxxxxxxxxxxxxxx');
    echo $redis->ping();
    
    • This topic was modified 7 years, 6 months ago by mathewhd.

The topic ‘Plugin is not detecting redis client, php says it’s installed’ is closed to new replies.