Made error messaging work with PHP.