1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Chrome page preview not working in NotePad++ anymore!

Discussion in 'HTML & Website Design' started by Mr.Dog, Sep 16, 2018.

  1. #1
    Hi,

    I noticed in recent months that my Notepad++ would not show the previews of my pages.

    I mean this function: RUN > LAUNCH IN CHROME.

    It used to work. But now it's not working. The source code appears instead of the clean site.
    Firefox works, though. But I need Chrome.

    Anyone had this problem? What is the solution?
     
    Mr.Dog, Sep 16, 2018 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Don't rely on the editor to handle that. Save it to a file, then open it in chrome. Easy-peasy lemon-squeezy.
     
    deathshadow, Sep 16, 2018 IP
  3. denis bayly

    denis bayly Well-Known Member

    Messages:
    104
    Likes Received:
    28
    Best Answers:
    6
    Trophy Points:
    105
    #3
    Hi there Mr.Dog,

    I normally, just like @deathshadow, open the saved files in the browser. ;)

    But, as a matter of interest, I tested the Run > Launch in Chrome option
    in Notepad++ v7.5.6 and Windows 7 without any problems. :D

    coothead
     
    denis bayly, Sep 16, 2018 IP
  4. Spoiltdiva

    Spoiltdiva Acclaimed Member

    Messages:
    7,732
    Likes Received:
    2,889
    Best Answers:
    53
    Trophy Points:
    520
    #4
    Being ESL as I am, I am always looking to improve my command of English. Today I learnt something new....thanks DP!:cool:
     
    Spoiltdiva, Sep 16, 2018 IP
  5. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #5
    The files are PHP files, so Chrome will open them just like Notepad++: shows the source code.

    But I need to see the pages themselves. No idea why, but in the past it worked for many years! (This is how I built webpages).
     
    Mr.Dog, Sep 25, 2018 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #6
    ... and since when has notepad++ had PHP built into it?!? That's news to me.

    I mean if you're writing PHP you should be testing in ACTUAL PHP... by testing on a real server (not always practical) or a local testing server such as XAMPP. That way you have access to SQL and all sorts of other fun (and often essential) stuff.

    That's not something I would even expect an editor to have baked in, and if it did I sure as shine-ola wouldn't trust it! Ends up as silly and pointless as the mentally enfeebled "preview pane" BS.
     
    deathshadow, Sep 25, 2018 IP
    denis bayly likes this.
  7. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #7
    I don't know, but I use to open the .PHP files through Notepad++ with Chrome. And they would open just like .HTM files.

    Any ideas on how to get this to work? How Chrome could load .PHP offline?

    I am doing a lot of work offline as well, can't keep up/down-loading for checking tiny details.
     
    Mr.Dog, Sep 25, 2018 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #8
    NEVER heard of it doing that, not something I would expect to work much less be trustworthy unless the editor is installing a full copy of PHP alongside itself (which would be stupid), or even be useful without also installing whatever SQL engine you are using along with that (which would also be just strange)

    ... at which point, just install a testing server.

    If not up to creating a testing server VM, I suggest installing XAMPP:

    https://www.apachefriends.org/index.html

    Which gives you a reasonable approximation of a real world server -- apache, php, mysql. (well, mariaDB, but that's splitting hairs -- for now)

    Install it, open the panel for it and start apache and SQL, go to the /XAMPP/htdocs directory, create a subdirectory for testing your code it, move your code to that directory, the to test you just localhost as the domain name. No remote server needed and you can edit the files directly in said directory.

    That's how I've always done it when not testing on a local VM.

    Doing that with the editor? That's just unreliable garbage I'd never even consider a valid approach. Admittedly, I say that about most "IDE/RAD" style editors and all the buggy, unreliable half-assed garbage they are weighed down with.

    But what do I know?!? I consider Flo's Notepad2 the pinnacle of programmer's editor development because it doesn't have any of that malarkey. In fact I rank it so highly because of what it's missing and what I can turn off!
     
    deathshadow, Sep 25, 2018 IP
  9. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Too complicated. Is there a simpler way?

    Chrome could simply open my .PHP files offline. Now it's impossible. Firefox can do it, though... but I need Chrome.
     
    Mr.Dog, Oct 14, 2018 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Firefox should NOT be doing it. Some tool you installed must be providing that functionality to it. By itself firefox cannot run PHP.
     
    deathshadow, Oct 15, 2018 IP
  11. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #11
    It is hard to get less difficult than LAMP, WAMP or XAMPP. You can accept the default settings for your OS on install and use as-is. Everything else is a PITA by comparison.

    gary
     
    kk5st, Oct 15, 2018 IP
  12. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #12
    Gary, I don't know much about what LAMP, WAMP, XAMPP means.

    Is there any way that I can make local (offline) .PHP site page files run on Chrome (I intend to use the "Launch in Chrome" function in Notepad++).

    Could it be the Chrome version that I'm using? Perhaps newer Chrome versions cannot run .PHP files offline/locally for some reason.
    But for some reason, I am unable to replace the new version with a... let's say 2016 or 2017 version. It just doesn't let it, keeps updating automatically to the newest version.
     
    Mr.Dog, Oct 25, 2018 IP
  13. denis bayly

    denis bayly Well-Known Member

    Messages:
    104
    Likes Received:
    28
    Best Answers:
    6
    Trophy Points:
    105
    #13
    Hi there Mr.dog,

    Why don't you at least try this suggestion...
    coothead
     
    denis bayly, Oct 25, 2018 IP
  14. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #14
    I installed XAMPP. Not sure how to use it. It seems like all of its functions are being blocked by the Windows Firewall. Anyway, I unblocked them and Chrome still cannot load .PHP files.

    Isn't there a simpler way?

    If I remember correctly until this summer I was still able to load the .PHP files in Chrome from Notepad++.

    Something happened since then and now I just can't get it to run :(
     
    Mr.Dog, Oct 25, 2018 IP
  15. denis bayly

    denis bayly Well-Known Member

    Messages:
    104
    Likes Received:
    28
    Best Answers:
    6
    Trophy Points:
    105
    #15
    Hi there Mr.Dog,



    Then you, obviously, must learn how to work with it. :D

    One of these....

    XAMPP tutorials

    ...should help you on your road to enlightenment. ;)


    coothead
     
    denis bayly, Oct 25, 2018 IP
  16. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #16
    1) Start XAMPP.

    2) Open up the easy control panel it provides.

    3) Next to PHP, click "start" to start the server services. (also click the one next to mysql if needed, you really shouldn't "need" the others)

    4) access its root directory via

    http://localhost
    Code (markup):
    Done. If you're on windows the directory being served as localhost is at C:\xampp\htdocs.

    You shouldn't be having to screw around with windows firewall unless you're trying to access it from a different computer than the one you're running XAMPP on.

    It doesn't get simpler than that really -- the behavior you describe working in FF being complete nonsense unless you've installed something LIKE XAMPP already or your editor did... something I don't think and last I knew notepad++ doesn't provide. though admittedly it's been a decade since I looked at it last.
     
    deathshadow, Oct 25, 2018 IP
    Karen May Jones likes this.
  17. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #17
    Thanks for the tips, I will research these XAMPP things.

    What the heck did I have in Chrome a few months ago? .PHP was running without any problem. Why is it still running in Firefox?
     
    Mr.Dog, Oct 31, 2018 IP
  18. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #18
    Maybe some sort of cache?
     
    Karen May Jones, Oct 31, 2018 IP
  19. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #19
    I would be wondering just what you have installed that makes it run in FF in the first place. Something like XAMPP has to be present/running for that to even happen. AT MINIMUM PHP itself must be installed somewhere.
     
    deathshadow, Nov 1, 2018 IP
  20. Karolwf

    Karolwf Active Member

    Messages:
    112
    Likes Received:
    24
    Best Answers:
    1
    Trophy Points:
    70
    #20
    I have no PHP server installed on my computer.

    Notepad ++ ->Run->Launch in:
    I can preview .php and .htm pages in firefox 63.0.1
    Not in Chrome or IE.
     
    Last edited: Nov 2, 2018
    Karolwf, Nov 2, 2018 IP