note 102986 added to function.fread

From: Date: Fri, 18 Mar 2011 13:59:29 +0000
Subject: note 102986 added to function.fread
Groups: php.notes 
Request: Send a blank email to php-notes+get-177977@lists.php.net to get a copy of this message
If you serve a file download over PHP with fread and print/echo and experience corrupted binary files, chances are the server still uses magic quotes and escapes the null bytes in your file. Although from 5.3.0 magic quotes are no longer supported, you might still encounter this problem. Try to turn them off by placing this code before using fread: <?php @ini_set('magic_quotes_runtime', 0); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 212.178.120.42 ---- Manual Page -- http://www.php.net/manual/en/function.fread.php Edit -- https://master.php.net/note/edit/102986 Del: integrated -- https://master.php.net/note/delete/102986/integrated Del: useless -- https://master.php.net/note/delete/102986/useless Del: bad code -- https://master.php.net/note/delete/102986/bad+code Del: spam -- https://master.php.net/note/delete/102986/spam Del: non-english -- https://master.php.net/note/delete/102986/non-english Del: in docs -- https://master.php.net/note/delete/102986/in+docs Del: other reasons-- https://master.php.net/note/delete/102986 Reject -- https://master.php.net/note/reject/102986 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177977) next »