updated PHP sample error messaging and comments