e-oz / Memory

PHP Memory Cacher - best cachers in one interface, with nice features
134 stars 40 forks source link

Bug in RedisServer driver when working with remote redis server #2

Closed endeveit closed 12 years ago

endeveit commented 12 years ago

It appears when working with remote redis server. When reading response from socket and MTU is less than fread()'s $length argument, fread() according to the documentation returns the first packet and its size is less than 4096 bytes. So returning data becomes corrupted. Possible solution is to decrease the reading block size to 1024 bytes or to use stream_get_contents() function.

e-oz commented 12 years ago

Thank you very much!