Class Kdyby\Redis\Driver\PhpRedisDriver contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (Kdyby\Redis\IRedisDriver::isConnected, Kdyby\Redis\IRedisDriver::getLastError, Kdyby\Redis\IRedisDriver::clearLastError)

My config:

extensions:
    console: Kdyby\Console\DI\ConsoleExtension
    redis: Kdyby\Redis\DI\RedisExtension

redis:
    host: 127.0.0.1
    port: 6379
    journal: off
    session: off
    storage: off
    debugger: on

coomposer.json:

"require": {
        "php": ">= 5.3.7",
        "nette/nette": "~2.2.0",
        "kdyby/console": "~2.3.0",
        "o5/grido": "~2.0.0",
        "kdyby/curl": "~2.2.0",
        "kdyby/redis": "~3.2.0"
    },

Máš nainstalovanou stable verzi phpredis, ideálně nějaký novější release?

Mám Redis 2.8.7 na Solarisu.

A to PHP rozšíření, na které odkazoval Filip, máš taky? Načítáš ho v php.ini?

Kdyby ne, tak to zařve: https://github.com/…isClient.php#L230

Nemůžu si pomoct, ale přijde mi že ty funkce z interfacu v tom RedisDriveru fakt nejsou.

Ona je totiž má definovat ta třída z toho php rozšíření.

Tak mám asi moc novou verzi phpredis nebo co:

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
echo $redis->isConnected();
PHP Fatal error:  Call to undefined method Redis::isConnected() in php shell code on line 1
php > echo $redis->getLastError();
PHP Fatal error:  Call to undefined method Redis::getLastError() in php shell code on line 1
php > echo $redis->clearLastError();
PHP Fatal error:  Call to undefined method Redis::clearLastError() in php shell code on line 1
php > print_r($redis->info());
Array
(
    [# Server redis_version] => 2.8.7
    [redis_git_sha1] => 0
    [redis_git_dirty] => 0
    [redis_build_id] => de04a259c23f6fa6
    [redis_mode] => standalone
    [os] => SunOS 5.11 i86pc
    [arch_bits] => 64
    [multiplexing_api] => evport
    [gcc_version] => 4.7.3
    [process_id] => 17712
    [run_id] => f9514232a880213ffc2fe8ad92e63f5ed88adc40
    [tcp_port] => 6379
    [uptime_in_seconds] => 430633
    [uptime_in_days] => 4
    [hz] => 10
    [lru_clock] => 502184
    [config_file] => /opt/local/etc/redis.conf
    [# Clients connected_clients] => 1
    [client_longest_output_list] => 0
    [client_biggest_input_buf] => 0
    [blocked_clients] => 0
    [# Memory used_memory] => 757688
    [used_memory_human] => 739.93K
    [used_memory_rss] => 757688
    [used_memory_peak] => 757688
    [used_memory_peak_human] => 739.93K
    [used_memory_lua] => 33792
    [mem_fragmentation_ratio] => 1.00
    [mem_allocator] => libc
    [# Persistence loading] => 0
    [rdb_changes_since_last_save] => 0
    [rdb_bgsave_in_progress] => 0
    [rdb_last_save_time] => 1409683050
    [rdb_last_bgsave_status] => ok
    [rdb_last_bgsave_time_sec] => -1
    [rdb_current_bgsave_time_sec] => -1
    [aof_enabled] => 0
    [aof_rewrite_in_progress] => 0
    [aof_rewrite_scheduled] => 0
    [aof_last_rewrite_time_sec] => -1
    [aof_current_rewrite_time_sec] => -1
    [aof_last_bgrewrite_status] => ok
    [aof_last_write_status] => ok
    [# Stats total_connections_received] => 2
    [total_commands_processed] => 2
    [instantaneous_ops_per_sec] => 0
    [rejected_connections] => 0
    [sync_full] => 0
    [sync_partial_ok] => 0
    [sync_partial_err] => 0
    [expired_keys] => 0
    [evicted_keys] => 0
    [keyspace_hits] => 0
    [keyspace_misses] => 0
    [pubsub_channels] => 0
    [pubsub_patterns] => 0
    [latest_fork_usec] => 0
    [# Replication role] => master
    [connected_slaves] => 0
    [master_repl_offset] => 0
    [repl_backlog_active] => 0
    [repl_backlog_size] => 1048576
    [repl_backlog_first_byte_offset] => 0
    [repl_backlog_histlen] => 0
    [# CPU used_cpu_sys] => 65.60
    [used_cpu_user] => 76.23
    [used_cpu_sys_children] => 0.00
    [used_cpu_user_children] => 0.00
)

Tak se ještě říkám, zda ten Solaris nemá trochu jinou libku než Ubuntu, na ubuntu ty funkce jedou ok :-(

Aha! Zkus to nainstalovat prostě přes pecl.

Tak ta z PECLu jede. Díky :)

Ahoj, zkousel to nekdo s kdyby/console? Pres homepagePresenter se mi to povedlo rozchodit, ale kdyz to ted zkousim pres console, tak mi to zase pise: “Please install and enable the redis extension.”

Diky


You must first log in to participate in this discussion