Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » weird characters in cms

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 14549 Views
  • schellmax
    Avatar
    Community Member
    126 Posts

    weird characters in cms Link to this post

    hello,
    after installing silverstripe on a client's server, weird characters are showing up in the cms.
    unfortunately uploading attachments in this forum seems to be buggy - i can't.
    the characters appear just before any html-code (even before doctype declaration), they change every time i log in, always 4 characters like 'ad28'.
    the frontend site itself is clean.
    has anybody an idea where this may come from or maybe a starting point where to search for a possible problem?
    thanks in advance

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: weird characters in cms Link to this post

    after several hours on irc (many thanks to all folks there) on many more hours alone on my own, i finally found a fix for this (ss version 2.2.1).
    in fact i don't know what exactly causes this error, maybe a bug in php version 5.2.5?
    to fix it do the following:

    file: sapphire/core/Requirements.php
    line: 183
    todo: before ‘return’ statement, add a line with ‘echo ” “‘
    – and –
    file: cms/code/LeftAndMain.php
    line: 205
    todo: before ‘return’ statement, add a line with ‘echo ” “‘

    this is just a workaround, any further description/fix for this problem is appreciated.

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: weird characters in cms Link to this post

    Thanks for the bug report, I've added to the bug tracker @

    http://open.silverstripe.com/ticket/2529

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: weird characters in cms Link to this post

    finally, the characters even arrived in the frontend site itself.
    this allows me specify the problem a little better:
    the characters seem to appear whenever a string is returned by some method and integrated in the html output. in addition, the string must have reached a critical length (i can't determine the exact limit).
    whenever you 'echo' some string before the return statement, the characters are gone.
    i was wondering wheter this has to do something with output buffering.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: weird characters in cms Link to this post

    This is some odd behaviour indeed, something that I've noticed before on another SS installation as a similar problem (a strange character left above the <?php tag on a class), but haven't personally come across it myself.

    Have you tried removing all your custom project code, to leave a bare SS installation? This could help pinpoint exactly where the problem is occurring.

    Typically this is a good way of debugging if you've got a problem like this, as it's not actually giving any errors! (d'oh!).

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: weird characters in cms Link to this post

    i removed all of my code and even did a fresh install - didn't solve the problem.
    i expected this, as my workaround (see previous posts) deals with untouched core files, although project code may suffer from the same problem in case a method returns something integrated in the final html output (as mentioned before)...

  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: weird characters in cms Link to this post

    This looks suspiciously like the chunk-size characters that HTTP chunked transfers add to the stream.

    For this reason, I suspect that this is happening because of a quirk in your web server configuration. Could you tell us a bit more about the web server that you're running on?

    * Apache, or something else? What version? Any non-standard modules running?
    * What version of PHP?
    * What operating system?

    If you could email me some details (to sam at silverstripe dot com) of where your server is running so that I could access the site myself, I could take a look at the raw HTTP output to see if I can determine what's wrong.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: weird characters in cms Link to this post

    Heh, that last post was from me - I was logged in as Mike! Sorry about the identity theft, Mike. ;-)

    14549 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.