• I have set up a WordPress blog on my own site, and as far as I can tell everything’s working fine. (As a theme, I chose “Falling Leaves.”) But there is a persistent problem that I haven’t been able to get rid of:

    Three lines of html-ish characters appear as text right on the main page, completely defacing the blog. In particular, this is what I see:

    Right at the top of the page are these characters:
    index.php1?xTx?xTxmBIN??*? header.php??v?l?v?lmBIN????

    Right above the first post are these characters:
    sidebar.php]?v?l???8mBIN????

    And after the end of the last post are these characters:
    footer.php??v?j?v?jmBIN???’

    Obviously, these are somehow supposed to be instructional codes that control the way the page looks — they aren’t supposed to show up as visible text on the page.

    I haven’t been able to figure out how to make them disappear, and I worry that if I poke around blindly via trial-and-error, I may delete the “offending” text from some some crucial file and end up also deleting essential html code.

    Any suggestions on how to make the text disappear? Aside from this one odd problem, everything else about the site seems to work fine. I tried to ask the designer of the theme, but haven’t heard back.

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • A link to your site would be useful so we can figure out exactly what is going on here and how it is affecting your site.

    Thread Starter dibs

    (@dibs)

    mylagoon:
    I know that a link would be helpful, but unfortunately I can’t give the link, as the site it is on is “not ready for primetime.” (It is situated on a subdirectory of someone else’s site which he keeps to make certain business documents available internally for a company, and he asked me to not post links to it, since it is not for public consumption.) My blog is only there at the moment so I can try it out as a “test run.” Later, I will move the blog to its own domain, after I have worked out the kinks.

    But you don’t really need the link — my description sums it up pretty well. The site itself functions perfectly, so the strange text doesn’t “affect my site” at all, except to make it have crazy text on it.

    Sorry to be obtuse about the link, but I promised I wouldn’t give it out.

    OK, that’s fine. I understand where you’re coming from.

    Well my best guess is that the text isn’t encoded correctly. Have you tried reuploading the theme via FTP? What changes (if any) have you made to the theme, and how?

    Thread Starter dibs

    (@dibs)

    Here — this might help:
    When I go to “View Source” (in Safari) for the page in question, I see this (cut and pasted in exactly):

    index.php_?5]4?5]4mBIN???k index.php1?xTx?xTxmBIN??*?
    header.php??v?l?v?lmBIN????<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”https://www.w3.org/1999/xhtml”&gt;

    <head profile=”https://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />

    <title>{NAME OF BLOG}</title>

    …Then, later, there is this:

    sidebar.php??v?l??aamBIN????<!– begin sidebar –>
    <div id=”sidebar”>

    So, I can see that there is extraneous text before the actual code that controls the page. But I can’t figure out which file contains that text, for me to get to it and delete it. I admit ignorance to how these “index” files seem to get generated dynamically, or where they “reside,” or whatever.

    Still can’t figure out this simple problem.

    You never answer the important questions asked above…
    There might be something wrong with that “mysterious” server.
    There might be something wrong with the editor if you opened any file before uploading.
    There might be something wrong with your FTP settings.

    [A sidenote: it doesn’t really make sense to “test” your install on a server and then move to another server – usually the server settings differ, so you’ll have to start over…]

    Thread Starter dibs

    (@dibs)

    There might be something wrong with that “mysterious” server.

    No, I’ve communicated with tech support for the server, and there’s nothing wrong with it at that end — dozens of WordPress blogs are hosted on the same server, and they all function fine.

    There might be something wrong with the editor if you opened any file before uploading.

    The editor I used is Apple’s “Textedit,” and it has the “Encoding” option set to “Save as UTF-8,” which is what it’s supposed to be.

    There might be something wrong with your FTP settings.

    I checked that too, and made sure that the ftp program doesn’t unncessarily add “.bin” to the end of every WordPress file (as some ftp programs do).

    [A sidenote: it doesn’t really make sense to “test” your install on a server and then move to another server – usually the server settings differ, so you’ll have to start over…]

    Actually, I will simply be moving the blog to a different domain on the same server, and was told by the Host that I wouldn’t have to start over at all — they could transfer everything to a new directory with a couple of keystrokes, with no change to any file.

    Well my best guess is that the text isn’t encoded correctly.

    That’s what I thought, but as far as I can decipher, everything is properly encoded at UTF-8.

    Have you tried reuploading the theme via FTP?

    Well, if I re-upload, won’t I then have to start from scratch? What I’m trying to avoid is re-uploading everything, just to fix what is probably a very simple problem.

    What changes (if any) have you made to the theme, and how?

    The only changes I made were to replace the “masthead” jpg — i.e. I downloaded the theme’s jpg, altered it a little in Photoshop, saved it as the exact same file name, and re-uploaded it. But that’s not the problem — the “visible code text” issue existed even before I changed the jpg.

    Thread Starter dibs

    (@dibs)

    I notice that the letters “BIN” occur repeatedly in the mysterious text, so I’m guessing the problem might have something to do with BinHex mapping when uploading files. I just checked my ftp program, and these are the settings it is currently at:

    Upload file options:

    X Use Internet Config’s File Mappings (“Intelligent”).
    Always as MacBinary.
    Always as Binhex 4.0.
    Always as Binary.
    Always as Text.

    (The “X” indicates that the first option out of these five is the one that is selected.)

    Also checked, lower down, is the option

    X Don’t add “.bin” extension for MacBinary uploads.

    Are these settings correct? Or are they the source of the problem? And if so, what are the proper settings?

    Are you using a word editor then pasting content into WordPress?

    If so, you may be keeping the formatting

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    dibs: I don’t know if those settings are correct or not, but you may want to try it with “Always as Text” checked instead. It’s worth a shot.

    Thread Starter dibs

    (@dibs)

    Otto42:

    Woohoo!! Great suggestion, even if it was a guess! I tried what you said — made the ftp upload preference be set to “Always as Text,” and then re-upload various files that seemed like they might be causing the problems. And, little, by little — it worked!

    I took me a while to identify which files needed to be re-uploaded, but after each correct one — like hitting a jackpot — one of the little lines of visible code would disappear when I refreshed the blog page. Now — the mysterious text is all gone! Thank you, Otto42.

    However, I now have a follow-up question: ALL of my WordPress files and folders were uploaded with the “incorrect” ftp upload preferences. So that means that perhaps there are other files as well that ware “mapped” erroneously as Binhex or whatever, instead of “text.” Should I re-upload everything, in order to “correct” this problem, even though it doesn’t seem to adversely affect the blog?

    My gut feeling on this is: If it ain’t broke, don’t fix it. I’ll leave the files as is, unless I discover some other problem with the blog. But I don’t want to actively cause a problem by trying to “fix” something that doesn’t require fixing.

    So: this issue is solved. Thanks everyone!

    And a notice to future WordPress users who have this problem: It can be fixed by ftp-ing the files as “text,” instead of “Binhex.”

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Great suggestion, even if it was a guess!

    Well… Call it an educated guess. I’ve worked with Mac’s before. ??

    Should I re-upload everything, in order to “correct” this problem, even though it doesn’t seem to adversely affect the blog?

    Yes. Or rather, you should re-upload anything and everything that has a PHP or HTML extension. You might also want to look in the settings of your FTP program to find out what extensions it treats as text, and make sure that you add PHP to that list. If you do this, then you can set it back to automatic mode.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Mysterious html codes appear as text on main blog page. Why?’ is closed to new replies.