It's not only RealURL's problem - although it's most common while users are manipulating this file manually to add custom rules. Anyway this problem also ocures with typo3conf/localconf.php
.
How to confirm:
Right click on the broken image and choose Open image in new window
it will open a file with address like: http://somedomain.tld/typo3/thumbs.php?&file=..%2Fuploads%2...etc
use some browser to preview the source code ie. in Chrome prepend the address with view-source:
like: view-source:http://somedomain.tld/typo3/thumbs.php?&file=...etc
. There should not be any whitespaces before the code of image...
How to prevent?
As you wrote. Check your config files like realurl_conf.php
or localconf.php
and make sure that there are no spaces before <?php
. In case of script ending.... just remove the ?>
tag, so script will end automatically without white spaces (even if you'll add 100 empty lines after last line of code), unfortunately sometimes finding this one annoying space in configs takes hours, so....
How to fix permanently?
I'm surprised, that isn't fixed after all these years still, while it's quite easy with ob_end_clean(), edit file: t3lib/thumbs.php
, at the beginning (ie. right after php tag) add line:
<?php
ob_start();
Next find main()
method, add at its begining line for cleaning output buffer, which will remove all garbage included from other files:
function main() {
ob_end_clean(); //here
...
Voila!