Welcome Guest, Not a member yet? Register   Sign In
DSN error ! the reason maybe the DB.php file
#1

[eluser]Unknown[/eluser]
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)) : ''
                        );
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)) : ''
#2

[eluser]Unknown[/eluser]
and in file DB_driver.php
can you add some code to prevent the php notice about : no char_set and no dbcollat in dsn database connect
#3

[eluser]Derek Jones[/eluser]
Thanks for reporting thankwsx, both were actually fixed a few days back in the SVN. If you update to the latest version of both files, the problem will be correct and you will be able to specify other db config items via a query string in your DSN url. See the updated instructions in the connecting page of the docs for details.




Theme © iAndrew 2016 - Forum software by © MyBB