Forum Moderators: coopster
My problem is that this error shows the root directory of my site, which I do not want.
Is there a way to make a custom PHP error page to hide this directory information?
This means you have display_errors [php.net] enabled which isn't a good idea for public facing servers. If you can turn it off in your php.ini then do, if you don't have access then you can do it at runtime [php.net].
The connect function of whatever database extension your using probably returns false on failure so you can check that and use it to return an error or continue.
Andrew