Results 1 to 9 of 9

Thread: compiler?

  1. #1
    Join Date
    Feb 2017
    Posts
    28
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default compiler?

    I am using WAMP to run localhost to test my website development. While I am using Notepad++, I edit the coding, then hit the "Save All" button, the go to Chrome to run the localhost. I take it as it's my final results. Is this how to do it?

    I am asking because when I change stuff (example, just a background jpg), it doesn't change to the edited image. Then when I do different things, it disappears? Then I change it back to original code (merely change the image file name), it doesn't work? I know it may be my errors. I just want to ask if I am running the localhost the right way, then I know it's something else.

    Years ago, I was SQL Programmer, Database Programming and Warehousing. I use a Compiler to switch between Servers. So I am thinking if there's still some compilng to do for WAMP/Notepad++. I also used Visual Studio/SQL Server (2008 Prof. Edition, still have the installation discs), but guessing it won't work well with today's Win10?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,372
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Basically, yes. You may need to clear the browser cache and refresh the page to see changes. Also, make sure your browser is pointed to the local host server, and to the specific page on it that you're working with. The address in the browser should be something like:

    http://localhost/pathto/whatever.htm

    Not like:

    file:///C:/wampfolder/wwworpublic/pathto/whatever.htm

    or anything beginning with file:

    Even though many pages will 'work' that way, in order to have all the benefits of the WAMP server, it must be http://localhost/, etc. And in order for it to be the specific page you're working on, it must point to it (not some other similar file) on the WAMP server.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2017
    Posts
    28
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    In the browser address bar, I type just "localhost" and it runs. I edit/use files in C:\wamp\www\*.*

    So, using Notepad++, I edit whatever and then click "Save All", it's done?

    Good point that I should clear the browser cache. Sometimes, I "X" the browser and pop it open again, sometimes it doesn't clear stuff. While I run "localhost" over and over, does it refresh or it still have old cache? Because I see things changes when doing this (without bothering with cache), but I guess it's still Microsoft Windows.

    When I had the SQL Server, I could have variables on a small window and watch the values.

    I don't even click on "WAMP" icon in MS Start (and does not show in SysTray), the "localhost" still works. Was I still supposed to click on WAMP (and see it in SysTray)?

    Has anyone tried installing/run MS Visual Studio 2008 and/or SQL Server 2008 in Win10? It's a large installation and rather not install and then uninstall (would then better off format/reinstall Windows).

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,372
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by CNT View Post
    In the browser address bar, I type just "localhost" and it runs. I edit/use files in C:\wamp\www\*.*

    So, using Notepad++, I edit whatever and then click "Save All", it's done?
    Some browsers will show "localhost" in the address bar when they are only accessing the local hard drive. If that's what's happening, you will also see the drive letter (C usually). Once you're viewing via WAMP, there will be no drive letter. And you must always launch WAMP and see it up and running (only black and white icon, if there's any color, it's still loading - might vary by OS and version) in the sys tray before trying to utilize it.

    If WAMP is not loaded, and you see localhost with no drive letter, it has to be a cached version of the page.

    If there're still problems, perhaps you didn't accomplish what you intended in the edit. There's no compilation step, though, as I also said, the browser cache may need to be cleared and the page refreshed to see results.

    Just closing the browser and reopening will not always clear the cache. To be certain, you need to go into settings and manually clear the cache, but there are shortcuts that usually work. And, yes sometimes changes will take effect immediately, but if they don't, a page refresh and clearing of the cache may be required. In many browsers (not all, I think current Firefox is the exception, but this is also version specific with the browsers) CTRL + F5 will clear the cache and reload in one step, but only if the focus is currently on the page you're working on.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    432
    Thanks
    0
    Thanked 54 Times in 50 Posts

    Default

    If you are simply developing web pages with HTML and JavaScript, you don't actually need a local web server as the pages can be run directly from the local hard drive. WAMP is the Windows version of the Apache server which includes PHP, MySQL. If you start to use server-side includes (SHTML pages) or PHP and MySQL then you will need to invoke the WAMP server before running any of your pages. You will also have to use WAMP if you want to have root-relative links in your pages as these will not work when the pages are run from the hard drive directly.

    You can actually have your files anywhere on your local drive, they don't have to be in the WAMP directory. There is a very good tutorial on setting up virtual hosts on WAMP here.

    There is a very important caveat to be aware of when running web pages on a local Windows host. Linux is case-sensitive and Windows isn't! So, "MyPicture.jpg", "mYpicturE.Jpg" and "MYPICTURE.JPG" will all point to the same file on a Windows host but three different files on a Linux host. It still catches me out occasionally!

    I hope that helps.

    Edited to add: I use XAMPP rather than WAMP. It supports MySQL, PHP version 7.1, MariaDB and PERL.
    Last edited by styxlawyer; 02-20-2017 at 11:30 AM. Reason: Additional information.

  6. #6
    Join Date
    Feb 2017
    Posts
    28
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by styxlawyer
    PHP... you will need to invoke the WAMP server before running any of your pages.
    I am using PHP, so have to use WAMP then? I learn that HTML is client-side and PHP is server-side. To me, server-side is, of course, usually faster and only loads results (but will still load coding/formula if coded in that page rather another page not loaded, right?). I am still trying to learn to show only directories instead of final file names, like example:

    http://www.dynamicdrive.com/forums/n...treply&t=80971

    but I want to show:

    http://www.dynamicdrive.com/forums/ OR http://www.dynamicdrive.com/

    Again, I will have to see if I can READ that somewhere.



    Quote Originally Posted by styxlawyer
    You will also have to use WAMP if you want to have root-relative links in your pages as these will not work when the pages are run from the hard drive directly.
    Not sure if I understand that, but I just woke up doing this computer already...


    Quote Originally Posted by styxlawyer
    There is a very important caveat to be aware of when running web pages on a local Windows host. Linux is case-sensitive and Windows isn't! So, "MyPicture.jpg", "mYpicturE.Jpg" and "MYPICTURE.JPG" will all point to the same file on a Windows host but three different files on a Linux host. It still catches me out occasionally!
    So, since I am using MS OS, I do my work on this system (along with NOT being case-sensitive), save it, upload to a webserver, then you use a Linus machine to view my website, will your machine saw errors?

    Quote Originally Posted by styxlawyer
    Edited to add: I use XAMPP rather than WAMP. It supports MySQL, PHP version 7.1, MariaDB and PERL.
    I am actually thinking about installing SQL Server 2008 to use instead of WAMP, but that's later. I attempted to try IIS, but it didn't work for me (of course, I probably didn't know how to do this), so that's why I download and just click WAMP, it ran without my configuration anything. I would guess I would better off using IIS since it's already with Windows (and IIS no need to licensing either), thus not need to install more stuff onto my slooow PC.

    Quote Originally Posted by jscheuer1
    WAMP (only black and white icon, if there's any color, it's still loading - might vary by OS and version) in the sys tray
    Mine remains green (in SysTray) all the time.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,372
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Green sounds good. Mine never has green, it starts with some red in it, that changes to yellow. When all the color is gone, it's fully loaded. So, as I say, may vary with version/os.

    And again, if you want to use PHP in this situation, you must have WAMP loaded and must navigate to the page over the WAMP server, not the local file system, otherwise the engine for interpreting PHP is unavailable. The very meaning of server side is that it happens on the server.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Feb 2017
    Posts
    28
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by jscheuer1
    cached
    CTRL + F5
    It seems to be odd problems for me... sometimes it works, sometimes it doesn't, sometimes it appears to work, etc... It is my guess that Chrome's CTRL-F5 is REFRESH instead of clear cache? Looks like I need to STOP with my web development and see what's all wrong with the browser and possibly going back to "browser wars".

    Is this good or still have to do clear steps every test page?
    https://chrome.google.com/webstore/d...cbeod?hl=en-GB

    I only choose Chrome because my kids uses it in school and my wife at work. Normally, I remain with free MS Explorer (now the Edge isn't that great either). Wished Netscape would won the browser wars, but they lost due it cost money to use it, duh.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,372
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Even if a given browser doesn't have shortcuts to clear the cache, you can just go into settings and do it that way. Most times though, simply refreshing the page will get you the updated content.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. runtime compiler!
    By sally in forum Java
    Replies: 2
    Last Post: 07-11-2010, 09:49 PM
  2. C Compiler
    By cancer10 in forum Computer hardware and software
    Replies: 5
    Last Post: 07-13-2008, 05:14 PM
  3. ECMAScript Compiler?
    By Trinithis in forum Computer hardware and software
    Replies: 4
    Last Post: 11-30-2007, 09:49 AM
  4. Good C++ compiler?
    By Trinithis in forum The lounge
    Replies: 7
    Last Post: 08-17-2007, 06:27 PM
  5. PHP to EXE compiler
    By djr33 in forum PHP
    Replies: 6
    Last Post: 02-07-2007, 01:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •