djlivi
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Another missing images problem…and checking the tickbox now to close this!
Forum: Networking WordPress
In reply to: Another missing images problemI’m going to close this – whatever has happened, something is deeply wrong somewhere.
I can bypass the problem using .htaccess to determine which blog is being addressed, and rewrite to the appropriate folder, along the lines of:
RewriteCond %{HTTP:Host} ^(www\.)?blogone\.com$ [OR] RewriteCond %{HTTP:Host} ^blogonedotcom\.hostdomain\.com$ RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.dir/3/files/$2 [L]
I can repeat that block of code for each of the small number of blogs on my site – as the number of blogs is small and rarely added to, I can live with this.
Not very happy, as this is clearly a hack workaround, and I’d much prefer to be able to properly fix whatever is broken… but it works.
Will do until someday I move the entire host over…Forum: Networking WordPress
In reply to: Another missing images problemThe rule in the OP works for one of the blogs, by bypassing ms-files.php and going direct to the file – so the files are there alright.
This is the latest in a relatively protracted series of attempts to fix up the site – it turned out that readfile was disabled previously but is enabled now.
I have to admit that I’m pulling my hair out on this now – I’ve been going back and forward trying to sort this out, and just can’t get any further.
I have the domain mapping plugin enabled, and all blogs work except for media and thumbnails – and htaccess is clearly working as noted in the OP. Trying to use ms-files.php always seems to result in a 500 error.
Forum: Networking WordPress
In reply to: Another missing images problemI’ve tried both of the following, neither of which works:
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] # OR this RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
(obviously not both at the same time)
With either of these, images are completely broken – trying to load a single image giving a 500 error :-/
Forum: Networking WordPress
In reply to: images files brokenSadly not for me, though almost all of the problem description matches my problem – looking at my wp_sitemeta table, there is no entry for ms_files_rewriting at all – adding it with a value of 1 doesn’t seem to improve things either. When I get the energy I’ll start a new thread ??
Forum: Networking WordPress
In reply to: images files brokenFor what it is worth, I seem to have an identical problem with broken image links (working .htaccess, WPMS install that used to work but now with broken image links except when editing the image itself)
Also on 3.8.1, and also started on WPMU (unknown version number)
I’ve followed this thread carefully, and path settings, etc are all as described by SozomaiForum: Networking WordPress
In reply to: Yet another WPMU image problemAnd to confirm: I had to reload some images that somehow got broken links along the way, but all is working now.
Forum: Networking WordPress
In reply to: Yet another WPMU image problemNow have readfile working on the blog… and I now have some images back. On some blogs, all images are back – on the blog I’ve been linking to only some images are back.
I reckon that in all the previous attempts to fix things that weren’t broken, I must have broke something! Still, I’m hoping that I’ll be able to manage from here…Thanks again to all
Forum: Networking WordPress
In reply to: Yet another WPMU image problemThink I’ve found it, in an unexpected place – looks like php readfile() was disable for security purposes when php was last updated on the server.
As you say, I might have been the only person using it…Have put in support ticket with my host, will let you know if this sorts it out…
thanks again for all your help and suggestions!
Forum: Networking WordPress
In reply to: Yet another WPMU image problemImages vary a lot in size – includes trimmed headers and uploaded images. Header images might be 30k to 60k as jpg or png.
Will do some more php tests to see if readfile works under any circumstances, if not then at least that’ll be problem…
Forum: Networking WordPress
In reply to: Yet another WPMU image problem5.3.18
Just looking at build date listed on Phpinfo – which gives Nov 5th, so it could have been a php update that broke my images? (This is on a shared virtual server, so I would have expected other users to be affected)
Forum: Networking WordPress
In reply to: Yet another WPMU image problemReadfile is silently failing. Which is something Im at a loss to think how to fix.
For info,
I commented out the central part of the body of ms-files.php – everything after it determines the full path name.
At the end I added the following:echo "<br />Made it to the end of ms-files.php. <br /> File is: " . $file; echo "<br /> is size " . filesize( $file ); if (file_exists($file)) echo "<br /> file exists."; else echo "<br /> file not found."; if (!readfile($file)) echo "<br /> readfile failed."; else echo "<br /> readfile succeeded."; echo "<br /> readfile returned filesize = " . readfile($file);
And the result I get when visiting a media file is:
Made it to the end of ms-files.php.
File is: /home/virtual/public_html/wp-content/blogs.dir/5/files/2012/06/UNversity-Banner2.jpg
is size 37334
file exists.
readfile failed.
readfile returned filesize =Forum: Networking WordPress
In reply to: Yet another WPMU image problem… and the correct file name with the full path is being passed to the readfile() command at the end of the script. The correct filesize is being added to the header.
If I try to force download in the script, it downloads a file of size 0 though.
Have to admit that this is as likely some weird server error as it is a wordpress one, but no idea what that might be ??Forum: Networking WordPress
In reply to: Yet another WPMU image problemUpdate on where I’m at…
AllowOverride All is set.
I put some echo statements and a die at the head of wp-includes/ms-files.php.
This was enough to verify that https://unversitydotorg.virtualba.co.uk/files/2012/06/UNversity-Banner2.jpgis re-written to:
https://unversitydotorg.virtualba.co.uk/wp-includes/ms-files.php?file=2012/06/UNversity-Banner2.jpgNow going to try to work out why this isn’t serving the correct file…
Forum: Networking WordPress
In reply to: Yet another WPMU image problem.htaccess is as listed at the top of this thread. .htaccess is definately working and enabled, as I can create my own arbitrary rewrite rules and test them. And is the only .htaccess file on my server.
I recopied the rules from the setup page within WPMU itself just incase there was a typo there that I couldn’t spot.
Wondering if perhaps there are some settings/values being used by the scripts that do the final part of the mapping in wp-includes/ms-files.php that might be messing up.
Though Im thinking now of taking the extreme measure of just putting all my blogs into maintenance mode until 3.5 is out. ??