T3 unter IIS und MS SQL - Backend Login
| Autor | Nachricht |
|---|---|
|
Verfasst am: 03. 02. 2010 [09:34]
|
|
|
GoloM
Themenersteller
Dabei seit: 03.02.2010
Beiträge: 6
|
Hallo zusammen, ich habe zwar mittlerweile einige Erfahrung im Umgang mit Typo3, allerdings muß ich gerade Typo3 in einer reinen Microsoft-Umgebung aufsetzen. Mir ist klar, dass das nicht ideal ist, aber leider ist es Vorgabe und theoretisch sollte es ja auch gehen. Mit Hilfe des Wikis bin ich auch schon verhälnismäßig weit gekommen. PHP läuft, ODBC-Verbindung ist gesetzt und das Installtool läuft auch. Ich kann auch die Datenbank und einen Admin User im Installtool erstellen (wird auch alles in die DB geschrieben). Wenn ich mich jetzt aber versuche ins Backend einzuloggen, erscheint einfach die Login Seite nocheinmal (ohne Fehler). Der Loginversuch wird auch anscheinend protokolliert, da in der Tabelle sys_log folgender Eintrag erscheint: User %s logged in from %s (%s) Zum Test habe ich die Datenbankverbindung auf eine MySQL-Datenbank geändert und da funktioniert es (wie erwartet) problemlos. Von daher denke ich, dass das Problem eher bei MS SQL bzw. adodb/dbal zu suchen ist. Leider ist MySQL für den Auftraggeber keine Option. Mit folgenden Umgebungen tritt das Problem bei mir auf: Windows XP Pro SP3, IIS 5.1, MSSQL Server 2005 Express Edition, PHP 5.3.1 und Windows Server 2003, IIS 6, MSSQL Server 2005 Enterprise Edition, PHP 5.2.12 Hat vielleicht jemand eine hilfreiche Idee oder kennt das Problem? Ich würde mich über jegliches Feedback freuen. Gruß Golo "God put me on this Earth to accomplish a certain number of things... Right now I am so far behind, I will never die." -Calvin & Hobbes-
|
|
Verfasst am: 03. 02. 2010 [20:11]
|
|
|
GoloM
Themenersteller
Dabei seit: 03.02.2010
Beiträge: 6
|
Hmm, ok, nach einem Tag des Debuggens habe ich immerhin schon festgestellt, dass aus irgendeinem Grund wohl die Session ID im Cookie nicht mit der in der Tabelle be_sessions übereinstimmt... das erklärt das Fehlschlagen des Logins, denke ich. Trotzdem erklärt es mir nicht das warum, noch löst es mein Problem. Irgendwer zufällig eine Idee? Gruß Golo "God put me on this Earth to accomplish a certain number of things... Right now I am so far behind, I will never die." -Calvin & Hobbes-
|
|
Verfasst am: 05. 02. 2010 [14:25]
|
|
|
GoloM
Themenersteller
Dabei seit: 03.02.2010
Beiträge: 6
|
Falls jemand auf dieses Problem triftt, es läßt sich (vorerst) lösen, indem man in der Extension dbal folgendes einfügt: (class.ux_t3lib_db.php, Zeile 1495) PHP if ($res->databaseType == 'odbc_mssql'){
$c = 0;
foreach($output as $key => $value){
$output[$c] = $output[$key];
$c++;
}
}Bevor das aber Folgefehler produziert, habe ich es als Bug 13433 gemeldet. Gruß Golo "God put me on this Earth to accomplish a certain number of things... Right now I am so far behind, I will never die." -Calvin & Hobbes-
|
|
Verfasst am: 10. 02. 2010 [11:54]
|
|
|
qualle85
Dabei seit: 11.05.2009
Beiträge: 44
|
Vielen vielen Dank! Stand vor dem gleichen Problem. Hier die komplette Funktion sql_fetch_row, falls sich die Zeilennummer mal ändert: PHP /**
* Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
* The array contains the values in numerical indices.
*
* @param pointer MySQL result pointer (of SELECT query) / DBAL object
* @return array Array with result rows.
*/
public function sql_fetch_row(&$res) {
$handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : 'native';
switch ($handlerType) {
case 'native':
$output = mysql_fetch_row($res);
break;
case 'adodb':
// Check if method exists for the current $res object.
// If a table exists in TCA but not in the db, a error
// occured because $res is not a valid object.
if (method_exists($res, 'FetchRow')) {
$output = $res->FetchRow();
// Removing all assoc. keys.
// A workaround because in ADOdb we would need to know what we want before executing the query...
if (is_array($output)) {
// changes from GoloM start
if ($res->databaseType == 'odbc_mssql'){
$c = 0;
foreach($output as $key => $value){
$output[$c] = $output[$key];
$c++;
}
}
// changes from GoloM end
foreach ($output as $key => $value) {
if (!is_integer($key)) unset($output[$key]);
elseif ($value === ' ' && $this->runningADOdbDriver('mssql')) $output[$key] = ''; // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix.
}
}
}
break;
case 'userdefined':
$output = $res->sql_fetch_row();
break;
}
return $output;
} |



