When configuring Drupal 6 on our LAMP server, occassionally after entering the the database information on the Database Configuration screen, once submitted the interface simply return to the same database configuration screen with no errors - very frustrating.
All permissions appeared to be correct in our setup and we received no messages indicating otherwise.
The solution was to edit the settings.php file manually. Specifically the line:
$db_url = ‘mysql://username:password@localhost/databasename’;
While we aren't sure what causes this, likely permissions, we hope this saves someone else some frustration.