Project

General

Profile

Actions

Bug #58337

closed

'Clear all cache' redirects to 'Detected Fatal Error' with 'No database selected'

Added by Gerrit Mohrmann almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2014-04-29
Due date:
% Done:

100%

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

Description

Detected Fatal Error
Uncaught exception 'RuntimeException' with message 'TYPO3 Fatal Error: No database selected!' in /xxxx/typo3_src-test/typo3/sysext/core/Classes/Database/DatabaseConnection.php:1563 Stack trace: #0 /xxxx/typo3_src-test/typo3/sysext/install/Classes/Service/ClearCacheService.php(116): TYPO3\CMS\Core\Database\DatabaseConnection->connectDB() #1 /xxxx/typo3_src-test/typo3/sysext/install/Classes/Service/ClearCacheService.php(67): TYPO3\CMS\Install\Service\ClearCacheService->getDatabaseConnection() #2 /xxxx/typo3_src-test/typo3/sysext/install/Classes/Controller/Action/Tool/ImportantActions.php(162): TYPO3\CMS\Install\Service\ClearCacheService->clearAll() #3 /xxxx/typo3_src-test/typo3/sysext/install/Classes/Controller/Action/Tool/ImportantActions.php(57): TYPO3\CMS\Install\Controller\Action\Tool\ImportantActions->clearAllCache() #4 /xxxx/typo3_src-test/typo3/sysext/install/Classes/C in /xxxx/typo3_src-test/typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1563

New T3 6.2.1 installation. Core symlinked.
After moving the database settings from LocalConfiguration.php to an external file and include this in AdditionalConfiguration.php the error comes up.
The Install Tool shows the right database parameter and the backend worked.
But 'Clear all caches' in the Install Tool throws the error.

AdditionalConfiguration.php:

<?php
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}

$configFile = PATH_site . '../../config/T3Configuration.php';
if (file_exists($configFile)) {
    require_once($configFile);
}

?>

T3Configuration.php:

<?php
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}

$GLOBALS['TYPO3_CONF_VARS']['DB']['database'] = 'xxxx';
$GLOBALS['TYPO3_CONF_VARS']['DB']['password'] = 'xxxx';
$GLOBALS['TYPO3_CONF_VARS']['DB']['host'] = '127.0.0.1';
$GLOBALS['TYPO3_CONF_VARS']['DB']['port'] = 3306;
$GLOBALS['TYPO3_CONF_VARS']['DB']['username'] = 'xxxx';

?>

Actions

Also available in: Atom PDF