Remember me? forgot password | register

SilverStripe Forum

7074 Posts in 1834 Topics by 1040 members

Jump to:

Site Builders

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Site Builders » weird characters in cms
Page: 1 , 2 go to end Reply
Author Topic: weird characters in cms 8977 views
  • schellmax
    schellmax's avatar
    Community Member
    10 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

    Last edited: 18 May 2008 at 1:56am

  • schellmax
    schellmax's avatar
    Community Member
    10 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
    196 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
    schellmax's avatar
    Community Member
    10 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
    Core Development Team
    368 posts
    1 SilverStripe Theme

    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
    schellmax's avatar
    Community Member
    10 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
    11 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
    Core Development Team
    475 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. ;-)

    8977 views
go to top Reply

Currently Online:

There is nobody online.

Welcome to our latest member: Anonymous user