We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20413
    • 2,877 Posts
    Wow! That is awesome hunting! Glad you shot it!! smiley
      @hawproductions | http://mrhaw.com/

      Infograph: MODX Advanced Install in 7 steps:
      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
    • FYI, this was likely the result of manually editing the config.inc.php file and including extra blank space outside of the PHP tags, as this is not appearing in the default config.inc.php file written by the install process.
        • 30497
        • 245 Posts
        Quote from: warenhaus at Mar 19, 2009, 01:48 PM

        Done! laugh

        a 3-byte Byte-Order-Mark (BOM) was passed through to the output of the generated image preview file.
        theoretically, it could have been my connector.php containing this 3 extra bytes of BOM. But it wasn’t. It took me a while to go through all the files that might interfere here, and I finally found it:

        MODX’s config.inc.php in /manager/includes/ started with a UTF-8 BOM. I had to open it with a hex-editor to see them (EF BB BF). I removed them by changing the encoding from "UTF-8 with signature" to "UTF-8" using Notepad2 (notepad++ or sth similar should also work).

        the 3-bytes of BOM from the config.inc.php probably were also output on every html-page, but went unnoticed there.


        it works now, after 3 months of troubleshooting, 3 extra bytes were the culprits.

        I just check the config.inc.php fle on the domain I am having trouble with, and it is UTF-8 (no BOM), so that is not the problem for me (even though symptom is the same).
          • 31955
          • 84 Posts
          @OpenGeek: I think so, too. It’s not visible blank space, however - it’s the UTF-8 byte order mark, only visible in a hex-editor.

          @towerofbabel: Make sure you check all the files that might be involved.

          I checked (there may be more):

          manager/media/browser/mcpuk/connectors/php/Commands/Thumbnail.php
          manager/media/browser/mcpuk/connectors/php/connector.php
          manager/media/browser/mcpuk/connectors/php/Commands/helpers/iconlookup.php
          manager/media/browser/mcpuk/connectors/php/config.php
          manager/includes/protect.inc.php

          and finally
          manager/includes/config.inc.php

          you can open up the file you get as (broken) image preview with the hex-editor I linked to above, to see if it really starts with EF BB BF. (I copied the image location and opened it with Firefox, then saved the file as jpeg).