snehac-miner / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

php client _return_number() cannot parse response #103

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$r = new Redis('localhost');
$r->ping();
$r->incr('counter');

generates the error:

"Cannot parse ':1' as numeric response."

I think the fix for this is to change the following in "_numeric_response"

< $s = trim($this->_read());
> $s = substr(trim($this->_read()),1);

..but I'm not sure what the ':' at the start of the string signifies.

Original issue reported on code.google.com by mpria...@gmail.com on 17 Nov 2009 at 8:51

GoogleCodeExporter commented 8 years ago
A  lot of things broke for me too with that version of redis.php

I still use the redis.php that's include with the client-libraries in v1.02 
tarball:

http://github.com/antirez/redis/raw/cbc59b38108dd71b8091be46bd7bdd3cd40c6fe3/cli
ent-
libraries/php/redis.php

Original comment by youwanta...@gmail.com on 18 Nov 2009 at 10:15

GoogleCodeExporter commented 8 years ago
please check out Predis or Rediska that are modern fully working PHP libs for 
Redis

Original comment by anti...@gmail.com on 23 Aug 2010 at 3:46