fixed Mac php errors