Ergebnis 1 bis 5 von 5

Thema: Nachträgliches Umstellen dbDriver MySQL -> MySQLi

  1. #1
    Contao-Nutzer
    Registriert seit
    10.06.2010.
    Beiträge
    77

    Standard Nachträgliches Umstellen dbDriver MySQL -> MySQLi

    Liebe Community,

    ich habe ein laufendes Projekt nun lokal auf meinen Testserver installiert. Version 3.3. Installiert wurde es damals mit MySQL.
    Nun wollte ich die Gelegenheit nutzen und den Treiber der Datenbank auf MySQLi umstellen. Dazu (dachte ich....) änderte ich einfach in der localconfig.php:

    $GLOBALS['TL_CONFIG']['dbDriver'] = 'MySQL';

    in

    $GLOBALS['TL_CONFIG']['dbDriver'] = 'MySQLi';
    (wie in meinen anderen MySQLi Installationen hier)

    Allerdings gibts die Fehlermeldung:
    \system\modules\core\library\Contao\Database\Mysql i.php on line 54

    Wäre auch zu einfach gewesen. Wie könnte ich das am einfachsten bewerkstelligen?

    LG und Danke!
    Geändert von goisko (10.06.2015 um 10:31 Uhr)

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.172
    Partner-ID
    10107

    Standard

    Zitat Zitat von goisko Beitrag anzeigen
    Allerdings gibts die Fehlermeldung:
    \system\modules\core\library\Contao\Database\Mysql i.php on line 54
    Du hast die eigentliche Fehlermeldung nicht gepostet.

  3. #3
    Wandelndes Contao-Lexikon Avatar von BugBuster
    Registriert seit
    15.06.2009.
    Ort
    Berlin
    Beiträge
    10.514
    User beschenken
    Wunschliste

    Standard

    Wie lautet die Meldung genau? Die Zeile in der PHP reicht da nicht.
    Grüße, BugBuster
    "view source" is your guide.
    Danke an alle Amazon Wunschlisten Erfüller

  4. #4
    Contao-Nutzer
    Registriert seit
    10.06.2010.
    Beiträge
    77

    Standard

    Sorry, hier die Fehlermeldung:


    Code:
    [10-Jun-2015 11:28:06 Europe/Berlin] PHP Fatal error:  Uncaught exception 'Exception' with message 'Die angeforderte Adresse ist in diesem Kontext ungültig.
    ' in D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database\Mysqli.php:54
    Stack trace:
    #0 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database.php(77): Contao\Database\Mysqli->connect()
    #1 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database.php(161): Contao\Database->__construct(Array)
    #2 [internal function]: Contao\Database::getInstance()
    #3 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\System.php(122): call_user_func(Array)
    #4 D:\xampp\htdocs\local\testcms\system\modules\core\classes\Backend.php(37): Contao\System->import('Database')
    #5 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\System.php(142): Contao\Backend->__construct()
    #6 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\System.php(322): Contao\System::importStatic('Isotope\\Backend...')
    #7 D:\xampp\htdocs\local\w in D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database\Mysqli.php on line 54
    
    [10-Jun-2015 11:28:09 Europe/Berlin] 
    PHP Warning: mysqli::real_connect():  in D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database\Mysqli.php on line 50
    #0 [internal function]: __error(2, 'mysqli::real_co...', 'D:\\xampp\\htdocs...', 50, Array)
    #1 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database\Mysqli.php(50): mysqli->real_connect('localhost:/tmp/...', 'root', '', 'dbGGGGGGGGGG', 3306, '')
    #2 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database.php(77): Contao\Database\Mysqli->connect()
    #3 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\Database.php(161): Contao\Database->__construct(Array)
    #4 [internal function]: Contao\Database::getInstance()
    #5 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\System.php(122): call_user_func(Array)
    #6 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\User.php(89): Contao\System->import('Database')
    #7 D:\xampp\htdocs\local\testcms\system\modules\core\classes\FrontendUser.php(79): Contao\User->__construct()
    #8 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\User.php(151): Contao\FrontendUser->__construct()
    #9 [internal function]: Contao\User::getInstance()
    #10 D:\xampp\htdocs\local\testcms\system\modules\core\library\Contao\System.php(122): call_user_func(Array)
    #11 D:\xampp\htdocs\local\testcms\index.php(47): Contao\System->import('FrontendUser', 'User')
    #12 D:\xampp\htdocs\local\testcms\index.php(443): Index->__construct()
    #13 {main}

  5. #5
    Contao-Nutzer
    Registriert seit
    10.06.2010.
    Beiträge
    77

    Standard Gelöst

    Hm, ist mir jetzt peinlich, aber habe es eben hinbekommen.

    Also bevor ich den Installer aufgerufen habe, legte ich händisch die localconfig.php an. Dort habe ich nur zwei Zeile eingefügt:

    $GLOBALS['TL_CONFIG']['licenseAccepted'] = true;
    $GLOBALS['TL_CONFIG']['dbDriver'] = 'MySQLi';

    Dann Installer ausgeführt und: Alles passt und läuft mit MySQLi.

    LG und Danke Euch (für den Tipp mir die Zeilen aus genauer anzusehen...)

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •