php/mysql without internet connection

Programming, for all ages and all languages.
Post Reply
Xqzzy Rcxmcq

php/mysql without internet connection

Post by Xqzzy Rcxmcq »

Yes, I know this is the stupidest question, and that the answer is going to be "yes", but I still wanted to make sure just in case: can you install MySQL/php on a computer that's not connected to the Internet and use it as a server, develop your webapp on that, and then have other computers network to that as clients and access your webapp? I know it can probably be done but will there be any problems? Thanks.
AR

Re:php/mysql without internet connection

Post by AR »

yes, that is the point of the network loopback device (IP Address: 127.0.0.1). Other computers on the network can connect to the computer on port 80 to access the webserver (this is how intranets work). Can't say anything specific to MySQL/PHP, PHP itself should be "plug-and-play", MySQL may require some configuration but it shouldn't.
Warrior

Re:php/mysql without internet connection

Post by Warrior »

You must install apache with the PHP module (downloaded from PHP.net, follow the instructions) Then download mySQL and start the server (be sure to set a root password). After that download something like phpMyAdmin to manage the mySQL.

Detailed instructions are in the readme's of PHP and mySQL.

Good luck.
QuiTeVexat

Re:php/mysql without internet connection

Post by QuiTeVexat »

They put together a package at http://www.easyphp.org/ that simplifies the process. Might be helpful, though I haven't personally used it.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:php/mysql without internet connection

Post by Solar »

Been there, done that: no problems. I run a PhpWiki on my laptop mainly for offline purposes, but have shared it in a LAN on occassion.
Every good solution is obvious once you've found it.
Xqzzy Rcxmcq

Re:php/mysql without internet connection

Post by Xqzzy Rcxmcq »

Thanks to all of you for the replies! I hope this works. Ah...SQL. It's such a tricky thing. 8)
DevL

Re:php/mysql without internet connection

Post by DevL »

If you're not keen on usingphpMyAdmin you can take a look att MySQL's own administration adn query tools. They are not web based which can be a plus or a minus depending on your development environment.

If you're no concerned about concurrency (i.e. more or less exclusively doing SELECTs and very seldom performing UPDATEs and INSERTs etc) you could have a look at the SQLite database engine (http://www.sqlite.org) which is implemented as a library rather than through the traditional client/server architecture. I ran into some problems due to concurrent UPDATEs and settled for MySQL (yay for switching to another RDBMS in the middle of a project with a deadline - thank deity for Perl's database abstraction DBI!) so if you don't mind the extra setup and administration stick to MySQL.
Post Reply