No subject
Fri Oct 22 23:24:56 CEST 2010
> [2011-02-14 16:44 UTC] rasmus at php dot net
>
> Once again, the fix is trivial. Put session_write_close() in
> your script when you are done with the session.
>
> We'll come up with a fix eventually, but it isn't a trivial
> thing to fix.
Calling session_write_close() at the destructor of the
tx_install_session class seems to be the most easy solution.
How to test:
Enable the PHP extension APC on a Debian Squeeze machine (or other which
might be affected) and try to install TYPO3 4.5.1 (e.g. introduction
package).
Cheers,
Ernesto
--------------060809070208090609090002
Content-Type: text/plain;
name="17732.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="17732.patch"
Index: typo3/sysext/install/mod/class.tx_install_session.php
===================================================================
--- typo3/sysext/install/mod/class.tx_install_session.php (revision 10580)
+++ typo3/sysext/install/mod/class.tx_install_session.php (revision )
@@ -380,7 +380,23 @@
return TRUE;
}
+ /**
+ * Writes the session data at the end, to overcome a PHP APC bug.
+ *
+ * Writes the session data in a proper context that is not affected by the APC bug:
+ * http://pecl.php.net/bugs/bug.php?id=16721.
+ *
+ * This behaviour was introduced in #17511, where self::write() made use of t3lib_div
+ * which due to the APC bug throws a "Fatal error: Class 't3lib_div' not found"
+ * (and the session data is not saved). Calling session_write_close() at this point
+ * seems to be the most easy solution, acording to PHP author.
+ *
+ * @return void
+ */
+ public function __destruct() {
+ session_write_close();
-}
+ }
+}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_session.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/install/mod/class.tx_install_session.php']);
--------------060809070208090609090002--
More information about the TYPO3-team-core
mailing list