• Just a word of suggestion for everyone. Never ever use notepad to edit php files. I spent the good part of 6 hours trying to figure out one of those white screen warnings. The WP FAQ was right about what the problem was, and that was junk characters at the beginning of my wp-config.php file. However, neither notepad nor notepad++ could see these characters. What’s worse is that the FAQ says “notepad is fine” Well, based on the experience I just had, Notepad is NOT FINE. If you’re going to edit php files, I suggest HTML Kit. It’s free and it saw what the other two programs did not. Hope this posts saves someone some time that I wish I had back…

Viewing 15 replies - 1 through 15 (of 18 total)
  • I like to use WordPad but I believe Notepad works fine for most of us.

    Thread Starter dax702

    (@dax702)

    I will never use notepad to edit a php file again, not after what happened. You can use it if you like, but if you run into white screen warnings, errors, check the file in HTML Kit

    There is no valid reason – other than personal preference – not to use Notepad or Notepad++ for editing. I edit php files with Notepad++ every day (been using it for a long time), and it works just fine. I also use Notepad on occasion, and haven’t had any problems (that I didn’t create myself) with that either. Perhaps you just encountered an odd encoding issue.

    Yeah, there shouldn’t really be any issues.

    Thread Starter dax702

    (@dax702)

    I edit php files with Notepad++ every day (been using it for a long time), and it works just fine. I also use Notepad on occasion, and haven’t had any problems

    I didn’t create this problem myself either and up until today, I used notepad and notepad++ with no trouble. Bottom line is that it’s possible that you can somehow end up with junk in your file that Notepad will not display and it can either drive you mad because you think your file is clean, or you can discover it right away using HTML Kit.

    Bottom line is that it’s possible that you can somehow end up with junk in your file that Notepad will not display

    Of course it’s possible. Issues like yours can arise from encoding errors on occasion.

    You have found an editor that you are comfortable with, and that works for you. That’s fantastic! That’s what is important; finding something that works for you, and that you are comfortable in recommending to others. It just doesn’t merit recommending that others not use Notepad or Notepad++. There isn’t any sound basis for that advice. They are both longstanding, time proven tools, and they both work well. These things just pop up once in a while.

    Just for giggles, do you remember what the characters you found in the file using HTML Kit looked like before you removed them?

    Thread Starter dax702

    (@dax702)

    

    Thread Starter dax702

    (@dax702)

    Well, I did not save the config file with any special options in notepad. Actually it was already there and I just edited it from time to time. So the question is, if I simply downloaded, edited, saved and re-uploaded the file, how did the BOM characters get in there? The wikipedia entry for BOM says “Many Windows programs (including Windows Notepad) add BOMs to UTF-8 files by default.” So really, this just furthers the reasons for my abandonment of Notepad for php file editing.

    ClaytonJames wrote:

    byte order mark

     characters

    dax702 wrote:

    So the question is, if I simply downloaded, edited, saved and re-uploaded the file, how did the BOM characters get in there?

    This happens quite often when using a .txt extension in Windows. Just Google search the issues that webmasters have with Google not being able to crawl their robots.txt file. You may have been working with a .txt file previously and your PC became buggy thereafter. If your using Windows anything can happen.

    What happens in Windows, stays in Windows. LOL

    Thread Starter dax702

    (@dax702)

    haha, now it’s my pc that is buggy? Naa,,the fix is just don’t use an editor that either cannot see the BOM, or creates the BOM “at random” Then again, now that I’m aware, at least I know HOW to check a php file for the BOM and it’s NOT with notepad as the WP faq says is “ok”

    NOT with notepad as the WP faq says is “ok”

    C’mon, guys/gals….

    Your pc probably isn’t “buggy”, and Notepad is perfectly acceptable and widely used for editing. It’s also unlikely that Notepad is directly responsible for your error. By default the encoding option in notepad is set to save as ANSI. However, when you save your changes, it also presents you with the option to save your .txt document as Unicode, Unicode big endian, or UTF-8. So there’s one possible avenue of accidental user error. Whether you want to think you made an accidental error or not, it’s still possible.

    In the Notepad++ menu bar you will find an “Encoding” option. What is yours set to? Probably still ANSI, but there is a lot of options there as well. Two of those choices are: UTF-8 with, or without, BOM. So, there’s another possible avenue of unintentional error or mistake. It just happens sometimes. There is nothing wrong with notepad as an editor. There are numerous other editors with lots of useful features, but there is nothing wrong with using notepad as a plain text editor in a windows environment.

    C’mon, guys/gals….

    This appears to be something of a personal crusade by the OP.
    http://wordpress.org/support/topic/re-warning-cannot-modify-header-information-headers-already?replies=13

    Ahhh… I didn’t see that. Well, you can lead ’em to water, but…

    🙂

    Thread Starter dax702

    (@dax702)

    I suppose it is somewhat of a personal, venting crusade. I only posted my experience because I don’t want someone else to have to go through what I did the other day and waste so much time reading and reading only to find out that the FAQ is wrong. At the very least they should put something in there that says that Notepad cannot see the BOM.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘NEVER use notepad to edit php files’ is closed to new replies.