Update PHP library and fix compatibility problems
Fixing dirs