Please notice that the return value of this function is a boolean but the return value of fseek is 0 for ok and -1 for failure.Please use this implementation when working with files:function stream_seek($offset, $whence) { if(0 === fseek($this->_handler, $offset, $whence)){ return true; } return false;}