[wp-trac] [WordPress Trac] #14730: ms-files.php required ob_clean() and flush()

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 30 04:53:21 UTC 2010


#14730: ms-files.php required ob_clean() and flush()
--------------------------+-------------------------------------------------
 Reporter:  pj_mfc        |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:                 
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 I recently migrated a development wp 3 multisite install to 'live' mode
 for a site launch.  One problem I had is that images served out of /files
 stopped working.  Everything looked fine as far as the response / headers,
 but the image would open up as corrupted.

 After quite a bit of troubleshooting, the problem went away when I added
 ob_clean() and flush() calls to ms-files.php just before the
 readfile($file) call at the end of the file.  Perhaps this is due to a
 problem elsewhere in my site, but I'm creating this bug so someone can
 decide if adding the buffer flush would be a reasonable addition to the
 codebase.  It seems like this is the recommended way of doing things
 according to the sample code here:

 http://us2.php.net/manual/en/function.readfile.php

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14730>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list