Project

General

Profile

Actions

Bug #19877

closed

md5's second argument is only valid for PHP5

Added by Jose Antonio Guerra over 15 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2009-01-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

10214.diff (545 Bytes) 10214.diff Administrator Admin, 2009-01-21 12:20

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #19866: PHP error due to "public static" keywords in PHP4 in t3lib_div::generateRandomBytes()ClosedMarcus Krause2009-01-20

Actions
Actions #1

Updated by Marcus Krause over 15 years ago

confirmed

md5's 2nd parameter was introduced in PHP5

workarround use md5() with single argument, wrapped by pack

Actions #2

Updated by Steffen Kamper over 15 years ago

committed to 4_0 and 4_1 (rev 4810,4811)

Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF