I don't know what status your code is in now, but the initial error was a missing closing single quote:
$db->configure(
'hmm',
'hmm',
'hmm',
'hmm',
'dbpre // <---- should be a single quote at the end of this value
);
$db->connect();
Without it, the parser was reading everything that followed as being part of that string literal until it encountered another single quote.