More PHP fixes