Updated PHP library with better error handling & logging without breaking existing compatibility

Also added license information to files and incremented the minor version.