New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The image [...] cannot be displayed because it contains an error #67
Comments
So, we need to track down whatever warning is being generated and sent If you turn error reporting on to If not, try commenting out the line that outputs the image data so we've |
I've changed lines 3 and 4 of image.php to:
PHP is also set to E_ALL. But I haven't managed to get any warnings or errors in my webserver's error log, Symphony's log or in the browser. I've also tried commenting out a couple of lines which I think are responsible for outputting the image data:
Anything else I can do to expose a warning? Without ob_clean: With ob_clean: (The text is alt text of the broken image.) |
Forgot to say that JIT's cache file is displayed successfully in Firefox if I open up the file directly from disk. |
@DavidOliver in my new server environment we don't quite have the issue; there's a feeling that there was a whitespace in a config we had no access to previously (which we obviously couldn't figure out) We've temporarily had an issue on the new setup; but it was also effecting other things; and had it resolved by the admin guys. If it works without |
@jonmifsud, thanks. Are you able to confirm that JIT images do work without ob_clean? What version of PHP were/are you using? |
Another user is getting this or a similar problem. Are we okay to remove |
It was unnecessary and was causing errors in images in some environments. Sorts symphonycms#67
Remove ‘ob_clean’ function from renderOutputHeaders method. Fixes #67
Thanks for accepting the PR. :) |
ob_clean()
was added to therenderOutputHeaders
method a while back because @jonmifsud was getting images that browsers weren't recognising as valid.This addition didn't pose any problem for me until now. I've set up a new dev environment using PHP 5.4, and I'm finding that the addition of
ob_clean
results in the same error @jonmifsud had without it.Both of the following fix it for me:
ob_clean()
ob_clean()
withob_end_clean()
Hopefully @jonmifsud will find that
ob_end_clean()
works, too. Having said that, if Symphony/JIT hasn't already added any output to the output buffer, neither of theob_
calls should be necessary, right?A comment from the ob_clean PHP page:
The text was updated successfully, but these errors were encountered: