fix ajax errors for diff php ver