Wordpress 3.3.1 Multisite subsites not displaying images



I have a virtual private server set up with a wildcard subdomain.

The site is working correctly except for this error:

The image “http://lincoln.playcreativeinc.com/files/2012/02/lincoln_footer_1.jpg” cannot be displayed because it contains errors.

When I navigate to http://lincoln.playcreativeinc.com/wp-content/blogs.dir/3/files/2012/02/lincoln_footer_1.jpg the image shows up fine.

When I use the media library to upload images for the main site http://www.playcreativeinc.com everything works correctly.

Here is my .htaccess file:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress

Here are the settings in my httpd.conf:

AllowOverride None
<Directory /home/xxxxx>
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,MultiViews,SymlinksIfOwnerMatch,FollowSymlinks
<Directory /home/xxxxx/playcreativeinc.com>
AddHandler cgi-script .cgi .pl .py
Options Includes Indexes SymLinksIfOwnerMatch ExecCGI
...large block of code

If you notice playcreativeinc.com directory doesn’t specify AllowOverride options at all. And the empty directory at the top specifies none.


Couldn’t really figure out what the original problem was but the solution is modifying wp-includes/ms-files.php by adding the function ob_clean(); before readfile.

// If we made it this far, just serve the file ob_clean(); readfile( $file ); ?>

Wordpress thread located here: