Best way to test web based programs without a server?

Click For Summary

Discussion Overview

The discussion revolves around methods for testing web-based programs, specifically PHP and MySQL, on a local machine without needing to upload changes to a remote server. The scope includes practical setup advice for a local development environment on Linux Mint.

Discussion Character

  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant inquires about simulating a server on their laptop to avoid frequent FTP uploads for testing changes.
  • Another participant suggests installing Apache, PHP, and MySQL on the laptop, noting that these may already be included in the Linux distribution.
  • A participant expresses concern about potential issues when running the client and server on the same machine, questioning if this setup might affect testing.
  • It is mentioned that local testing might not replicate all conditions of a live environment, particularly regarding restrictions that may differ between local and remote setups.
  • Participants advise caution with using references to localhost in the code, recommending the use of relative URLs to facilitate easier transitions between local and production environments.

Areas of Agreement / Disagreement

Participants generally agree on the feasibility of setting up a local server for testing, but there are concerns about the differences in behavior between local and remote environments, indicating some uncertainty about the implications of this setup.

Contextual Notes

There are limitations regarding the assumptions about the local environment and potential differences in behavior when transitioning to a production server that remain unresolved.

rollcast
Messages
403
Reaction score
0
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 that's anyhelp.

Thanks
A.
 
Technology news on Phys.org
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 .

This tutorial looks like just the thing for you:

http://community.linuxmint.com/tutorial/view/486
 
Last edited by a moderator:
jtbell said:
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 .

This tutorial looks like just the thing for you:

http://community.linuxmint.com/tutorial/view/486

Thanks I'm working through 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:
rollcast said:
Thanks I'm working through the tutorial now.

Will it matter that I'm running the client and server from the same machine when I'm testing it?
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:
Borg said:
Also, be careful with putting references to localhost in your code.

Using relative URLs in your code simplifies moving your stuff back and forth between your computer and your production server.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
11K
Replies
7
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
1K
  • · Replies 15 ·
Replies
15
Views
7K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 23 ·
Replies
23
Views
15K
Replies
2
Views
3K
Replies
10
Views
5K