by Mary Cooch.
Replying to myself here (usefully!) I found a link to this blog post on another thread http://blogs.iis.net/kehand/archive/2009/08/09/php-and-custom-error-pages.aspx
It suggests that if you have Windows/IIS then you should change a setting there that replaces the default, not very helpful, error message, with a Moodle one that at least might point you in the right direction. So I have emailed him to ask him to do that and we shall then see.