[Typo3] moc_filemanager outputs corrupted files : resolved

Tiberius Kaphur tkoopa at gmail.com
Thu Aug 11 14:06:00 CEST 2005


ok, the version of php running on the server is 4.2.2, for which fgets 
is not binary safe.

The corrupted files were always smaller than they should have been, 
where as the correct files (eg txt), even big ones, were always the same 
size. So I used the following workaround :

I edited class.tx_mocfilemanager_pi1.php by replacing the following :

-------------------------------------------------
while (!feof($fp)) {
	$buffer = fgets($fp, 4096);
	echo $buffer;
}
-------------------------------------------------

by

-------------------------------------------------
fpassthru($fp);
-------------------------------------------------


Which solved my problem.

Hope someone will find this useful...



More information about the TYPO3-english mailing list