manual read-only mode
Merge pull request #293 from will123195/2.2

manual read-only mode
php 5.4 compat
Merge pull request #297 from will123195/2.2

php 5.4 compat
fix
Merge pull request #298 from will123195/2.2

fix