05-19-2008, 09:44 PM
[eluser]Unknown[/eluser]
when I use dsn database connect, I find a error .
so I inspect the system/database/DB.php file and find some code above.
maybe the 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['host'], 1)) : '' should be 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : ''
Code:
$params = array(
'dbdriver' => $dns['scheme'],
'hostname' => (isset($dns['host'])) ? rawurldecode($dns['host']) : '',
'username' => (isset($dns['user'])) ? rawurldecode($dns['user']) : '',
'password' => (isset($dns['pass'])) ? rawurldecode($dns['pass']) : '',
'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['host'], 1)) : ''
);
so I inspect the system/database/DB.php file and find some code above.
maybe the 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['host'], 1)) : '' should be 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : ''