Bug #19877
closedmd5's second argument is only valid for PHP5
0%
Description
After upgrading 4.1.7 to 4.1.8 I get the following in the PHP error log:
apache2: PHP Warning: Wrong parameter count for md5() in /var/local/typo3/typo3_src-4.1.8/t3lib/class.t3lib_div.php on line 1395
In the install tool the "Generate Random Key" is not working anymore.
Environment: Debian Sarge, PHP 4.3.10-22 as Apache2 module
I've patched 4.1.8 following the Wiki guide:
Patching TYPO3 4.1.8 to work with PHP4
You have to change two files:
Open typo3_src-4.1.8/t3lib/class.t3lib_div.php, search for
public static function generateRandomBytes($count) {
and replace it by
function generateRandomBytes($count) {
Then open typo3_src-4.1.8/typo3/sysext/cms/tslib/class.tslib_content.php and insert below
require_once(PATH_t3lib."class.t3lib_parsehtml.php");
the line
require_once(PATH_tslib."str_ireplace.php");
Finally, you have to download the pear-package PHP_Compat and copy the file Compat/Function/str_ireplace.php to typo3_src-4.1.8/typo3/sysext/cms/tslib/ (Warning: Version 1.6.0a2 has an bug in the function str_ireplace. Download another version than this!)
That's it. Your Typo3 4.1.8 should now work in an PHP4-only environement.
(issue imported from #M10214)
Files