basic fixes for ext/phar
fixed the rdev stat array member again for streams
next portion of fixes for ext/phar