[php] (new:minor) Improved error messages and also redirect them to the server log.