• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.