added php checks and updates