Are you installing a new site or upgrading a site?
What version of Moodle are you installing or upgrading to?
What version of PHP is installed on the server?
If you're upgrading then try adding the lines for debugging to config.php (also shown here). This should show more details with the error.