CODERS: Do NOT let clients use Expression to modify php files!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • k0nr4d
    Confirmed User
    • Aug 2006
    • 9231

    #1

    CODERS: Do NOT let clients use Expression to modify php files!

    I'm posting this up to save any other coders a very very long search through lots of code...

    Microsoft Expression inserts an invisible mark called a 'byte order mark (http://en.wikipedia.org/wiki/Byte-order_mark)'. It causes the php scripts to output ? at the end of files, but its invisible in the code even in other editors. The only way to see it is if you output something before the byte order mark was inserted:

    In my case, my client opened the scripts config file, changed something and saved it (thus inserting this invisible mark that even i couldn't see in another editor afterwards).

    <?
    include('config.php');
    ?>

    Outputted nothing, whereas

    <?
    echo 'test';
    include('config.php');
    ?>

    Would output "test?", yet config.php itself had no output at all.

    So in summary, if you are experiencing mysterious code problems and are convinced you have gone mad, ask if someone using expression has edited your code
    Mechanical Bunny Media
    Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development
  • borked
    Totally Borked
    • Feb 2005
    • 6284

    #2
    I bet you figured that one out within no time ;)

    Thanks for the heads up.

    FWIW, Coda removes byte order marks on every save if saving as unicode (utf-8 no BOM)

    Also, don't BOM's show up when viewing invisible characters? I've always found the root of many an obscure problem by viewing invisible characters and looking for things "out of the ordinary"

    For coding work - hit me up on andy // borkedcoder // com
    (consider figuring out the email as test #1)



    All models are wrong, but some are useful. George E.P. Box. p202

    Comment

    • nation-x
      Confirmed User
      • Mar 2004
      • 5370

      #3
      Is that the ^M crap? There are alot of editors and ftp programs that add that crap on windows.

      Comment

      • AIbenjamink
        Confirmed User
        • Jan 2009
        • 420

        #4
        Have yet to experience this, but thanks for the heads up
        Benjamin : [email protected] : 405-243-447 : www.AdultInterface.com

        Comment

        • Adam X
          Now Giving 1 Fuck Daily
          • Apr 2002
          • 2493

          #5
          konrads the man..

          ahh the acursed invisible chars.. reminds of old apple ][+ days...
          Cronfund - Buy CRON now and earn 4% plus coin value. The best of DEFI!

          Comment

          Working...