Fixed php libraries to match changes in database