Best way to test web based programs without a server?

AI Thread Summary
To test web-based programs like PHP and MySQL for a website without the hassle of FTP, installing Apache, PHP, and MySQL on a Linux Mint laptop is recommended. This setup allows for local server access via URLs such as http://localhost. A tutorial is available to guide through the installation process. Running the client and server on the same machine is generally acceptable, but developers should be aware that local testing may not replicate all conditions of a live environment. It's advised to avoid hardcoding references to localhost in the code and to use relative URLs to facilitate easier transitions between local and production servers.
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 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:
rollcast said:
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?
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top