Project

General

Profile

Actions

Bug #53791

closed

Uncaught Exception: username, password or host was not accepted

Added by Franz Holzinger about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2013-11-20
Due date:
% Done:

0%

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

Description

After a upgrade from TYPO3 4.1 to 6.2 I run into this exception, if I try to open the backend. A clear error message should have been given instead. Nothing has been done in the Install Tool.

Uncaught TYPO3 Exception
#1270853884: TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established! (More information)

RuntimeException thrown in file
/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Database/DatabaseConnection.php in line 1563.

10 TYPO3\CMS\Core\Database\DatabaseConnection::connectDB()

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Database/DatabaseConnection.php:

00789:  public function fullQuoteStr($str, $table, $allowNull = FALSE) {
00790:   if (!$this->isConnected) {

00791:    $this->connectDB();

00792:   }
00793:   if ($allowNull && $str === NULL) {

9 TYPO3\CMS\Core\Database\DatabaseConnection::fullQuoteStr("0506393400dcb27f27e99fe7738e57cc", "be_sessions,be_users")

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Database/PreparedStatement.php:

00452:      break;
00453:     case self::PARAM_STR:

00454:      $value = $GLOBALS['TYPO3_DB']->fullQuoteStr($typeValue['value'], $this->table);

00455:      break;
00456:     case self::PARAM_BOOL:

8 TYPO3\CMS\Core\Database\PreparedStatement::replaceValuesInQuery("SELECT * FROM be_sessions,be_users WHERE be_sessio…be_users.endtime=0 OR be_users.endtime>1384940911)", array, array)

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Database/PreparedStatement.php:

00284:    }
00285:   }

00286:   $this->replaceValuesInQuery($query, $precompiledQueryParts, $parameterValues);

00287:   if (count($precompiledQueryParts) > 0) {
00288:    $query = implode('', $precompiledQueryParts['queryParts']);

7 TYPO3\CMS\Core\Database\PreparedStatement::execute()

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php:

00899:   $user = FALSE;
00900:   if ($statement) {

00901:    $statement->execute();

00902:    $user = $statement->fetch();
00903:    $statement->free();

6 TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::fetchUserSession(boolean)

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php:

00672:   }
00673:   // Re-read user session

00674:   $authInfo['userSession'] = $this->fetchUserSession($skipSessionUpdate);

00675:   $haveSession = is_array($authInfo['userSession']) ? TRUE : FALSE;
00676:   if ($this->writeDevLog) {

5 TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::checkAuthentication()

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php:

00441:   // Check to see if anyone has submitted login-information and if so register
00442:   // the user with the session. $this->user[uid] may be used to write log...

00443:   $this->checkAuthentication();

00444:   // Make certain that NO user is set initially. ->check_authentication may
00445:   // have set a session-record which will provide us with a user record in the next section:

4 TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::start()

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php:

00353:    $this->security_level = 'superchallenged';
00354:   }

00355:   parent::start();

00356:  }
00357: 

3 TYPO3\CMS\Core\Authentication\BackendUserAuthentication::start()

/home/path/public_html/typo3_src-master/typo3/sysext/core/Classes/Core/Bootstrap.php:

01024:   // might trigger code which relies on it. See: #45625
01025:   $GLOBALS['BE_USER'] = $backendUser;

01026:   $backendUser->start();

01027:   return $this;
01028:  }

2 TYPO3\CMS\Core\Core\Bootstrap::initializeBackendUser()

/home/path/public_html/typo3_src-master/typo3/init.php:

00069:  ->loadExtensionTables(TRUE)
00070:  ->initializeSpriteManager()

00071:  ->initializeBackendUser()

00072:  ->initializeBackendAuthentication()
00073:  ->initializeBackendUserMounts()

1 require("/home/path/public_html/typo3_src-master/typo3/init.php")

/home/path/public_html/typo3_src-master/typo3/index.php:

00032:  */
00033: define('TYPO3_PROCEED_IF_NO_USER', 1);

00034: require __DIR__ . '/init.php';

00035: 
00036: $loginController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\LoginController');

Actions #1

Updated by Markus Klein about 11 years ago

  • Status changed from New to Needs Feedback
  • Priority changed from Must have to Could have
  • Sorry but AFAIK it is recommended to upgrade to 4.5 first.
  • And it can be safely assumed that the Install Tool will be used as a first step, otherwise not only the DB connection might be a problem, but much more severe stuff.

Is your 4.1 installation already UTF-8?
If not you should convert it first.

Actions #2

Updated by Marcin Sągol about 11 years ago

Yesterday i have been working with migration 4.3 => 6.1. I did step by step upgrades 4.3 => 4.5 => 4.7 -=> 6.0 => 6.1 and had not such problem.

Actions #3

Updated by Franz Holzinger about 11 years ago

Now I restarted the upgrade from TYPO3 4.2 to 4.5, then to 6.2 and execution of the upgrade steps in the Install Tool. Now it works.

However a clear warning "The update steps in the Install Tool must be executed!" should have been shown instead of this uncaught exception message about a wrong username or password.

Actions #4

Updated by Markus Klein about 11 years ago

  • Status changed from Needs Feedback to Accepted
  • Priority changed from Could have to Should have

Ernesto: Can you please assign this to somebody?

Either we need a possibility to check whether the upgrade wizards were run, or the *.md file need a huge hint.

Actions #5

Updated by Ernesto Baschny about 11 years ago

  • Category set to Install Tool
  • Status changed from Accepted to Rejected
  • Priority changed from Should have to Won't have this time

I will work on the "Upgrade Documentation" still, so this will be covered at least with the documentation. In this I will also try to explain what exactly "technically" the Install Tool in 6.2 does automatically and on first run etc, to make that process more transparent and explained.

Not sure if we can catch this by the Core, as there might be way too many error situations which we cannot clearly pinpoint to an "Upgrade being done". In this case the same error could occur if there are some database settings buggy.

@Franz Koch, thanks for bringing that up!

Actions

Also available in: Atom PDF