erikdubbelboer / phpRedisAdmin

Simple web interface to manage Redis databases.
http://dubbelboer.com/phpRedisAdmin/
3.11k stars 666 forks source link

not support Redis server version 2.4.10 #84

Closed cenxun closed 8 years ago

cenxun commented 8 years ago

error msg :ERR unknown command 'SCAN' in D:\web\phpRedisAdmin\vendor\predis\predis\src\Client.php on line 367

maybe need some modify, For example, in the index.php file of the 7 lines to 27 lines ,Special treatment for the old version, use redis's keys command replace scan command

like's

    if (!empty($server['keys'])) {
        $keys = $redis->keys($server['filter']);
    } else {
        $next = 0;
        $keys = array();

        while (true) {
            if(isset($_GET['mode']) && $_GET['mode'] == 'old') {
                $keys = $redis->keys('*');
                break;
            } else {
                $r = $redis->scan($next, 'MATCH', $server['filter'], 'COUNT', $server['scansize']);
                $next = $r[0];
                $keys = array_merge($keys, $r[1]);

                if ($next == 0) {
                    break;
                }
            }
        }
    }

of cause, It's just a suggestion, not perfect.

erikdubbelboer commented 8 years ago

See https://github.com/ErikDubbelboer/phpRedisAdmin/issues/81