Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Best way to test web based programs without a server?

  1. May 8, 2012 #1
    I need to test some web based programs, eg. PHP, MySQL, for my dads website but I can't be bothered having to ftp the server everytime I make a slight change to the settings.

    Is there anyway I could maybe simulate the server and the website on my laptop? I'm running Linux Mint if thats anyhelp.

    Thanks
    A.
     
  2. jcsd
  3. May 8, 2012 #2

    jtbell

    User Avatar

    Staff: Mentor

    Install Apache, PHP and MySQL on your laptop. They might even be there already, as part of your Linux distribution.

    Then you'll have your own sever that you can access in a browser with URLs like http://localhost/blahblah [Broken].

    This tutorial looks like just the thing for you:

    http://community.linuxmint.com/tutorial/view/486
     
    Last edited by a moderator: May 6, 2017
  4. May 8, 2012 #3
    Thanks I'm working throught the tutorial now.

    Will it matter that I'm running the client and server from the same machine when I'm testing it?
     
    Last edited by a moderator: May 6, 2017
  5. May 8, 2012 #4

    Borg

    User Avatar
    Science Advisor
    Gold Member

    It shouldn't matter. The most likely problem is going to be that your local client won't have as many restrictions. Some things can work when you test locally can break when they're uploaded and used by a real client. Also, be careful with putting references to localhost in your code.
     
    Last edited: May 8, 2012
  6. May 8, 2012 #5

    jtbell

    User Avatar

    Staff: Mentor

    Using relative URLs in your code simplifies moving your stuff back and forth between your computer and your production server.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Best way to test web based programs without a server?
  1. PHP Web-based game (Replies: 3)

Loading...