Index: typo3/sysext/install/mod/class.tx_install.php =================================================================== --- typo3/sysext/install/mod/class.tx_install.php (Revision 8465) +++ typo3/sysext/install/mod/class.tx_install.php (Arbeitskopie) @@ -301,6 +301,10 @@ } $this->session = t3lib_div::makeInstance('tx_install_session'); + $sessionCreationError = $this->session->getErrorCreationMessage(); + if ($sessionCreationError !== NULL) { + $this->outputErrorAndExit('

' . $sessionCreationError . '

'); + } // ******************* // Check authorization @@ -4870,6 +4874,23 @@ return $out; } + /** + * Outputs an error and dies. + * Should be used by all errors that occur before even starting the install tool process. + * + * @param string The content of the error + * @return void + */ + function outputErrorAndExit($content, $title = 'Install Tool error') { + // Output the warning message and exit + header('Content-Type: text/html; charset=utf-8'); + header('Cache-Control: no-cache, must-revalidate'); + header('Pragma: no-cache'); + echo '

'.$title.'

'; + echo $content; + exit(); + } + /** * [Describe function...] * Index: typo3/sysext/install/mod/class.tx_install_session.php =================================================================== --- typo3/sysext/install/mod/class.tx_install_session.php (Revision 8465) +++ typo3/sysext/install/mod/class.tx_install_session.php (Arbeitskopie) @@ -75,6 +75,13 @@ var $regenerateSessionIdTime = 5; /** + * On creation of the session, store a potential error message here + * + * @var string + */ + var $sessionCreationError = NULL; + + /** * Constructor. Starts PHP session handling in our own var store * * Side-effect: might set a cookie, so must be called before any other output. @@ -113,10 +120,27 @@ if (version_compare(phpversion(), '5.2', '<')) { ini_set('session.cookie_httponly', TRUE); } + if (ini_get('session.auto_start')) { + $this->sessionCreationError = '

Error: session.auto-start is enabled

'; + $this->sessionCreationError .= '

The PHP option session.auto-start is enabled. Disable this option in php.ini or .htaccess:

'; + $this->sessionCreationError .= '
php_value session.auto_start Off
'; + } else if (defined('SID')) { + $this->sessionCreationError = '

Error: Session already started by session_start().

'; + $this->sessionCreationError .= '

Make sure no installed extension is starting a session in its ext_localconf.php or ext_tables.php.

'; + } session_start(); } /** + * Returns a potential error message for session handling. + * + * @return string Error message on creating our session or NULL if there is no error + */ + public function getErrorCreationMessage() { + return $this->sessionCreationError; + } + + /** * Returns the path where to store our session files */ function getSessionSavePath() {