Project

General

Profile

Actions

Bug #22063

closed

Backend login impossible with MSSQL via ODBC due to FetchRow() result

Added by Golo Meierhenrich over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-02-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When setting up Typo3 with dbal using MS SQL Server via ODBC you always get thrown back to the backend login when entering the correct credentials.
Tested with SQL Server 2005 SP3/PHP 5.3.1 and SQL Server 2005 Standard SP2/PHP 5.2.12.

Problem occures because sql_fetch_row returns an empty result although SQL Server returns "1" when processing the query
SELECT COUNT FROM "be_sessions" WHERE "ses_id" = '<actual session id>'
On MySQL FetchRow() returns an array with associative (coulmn name) and numeric indices, on MSSQL/ODBC the array has only associative (empty) indices. sql_fetch_rows deletes all associative entries to prevent doubles, so we get an empty result.
I fixed it (quick and dirty) with inserting the following code at line 1495 in class.ux_t3lib_db.php:
if ($res->databaseType == 'odbc_mssql') { $c = 0;
foreach($output as $key => $value){
$output[$c] = $output[$key];
$c++;
}
}

(issue imported from #M13433)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16781: Pagetree only shows up to Level 2 / Backend login impossible with MSSQL via ODBCClosedXavier Perseguers2006-12-12

Actions
Actions

Also available in: Atom PDF