Jump to content

Running PHP/MySQL in a local network


miffe

Recommended Posts

Yes, I know this question is not directly related to PHP, but it's for a PHP application I am producing. It runs on a MySQL/PHP server on one of my computers in a LAN. (IP 192.168.1.68), Now, to access it from another PC I type in the IP (or make a shortcut) and it appears... but when I disconnect/reconnect the router I get different IP's as everything gets rearranged. How can I establish a 'virtual address' or something like an internal hostname?Thanks .-miffe

Link to comment
Share on other sites

Hi, you either need a DNS-server (dynamic name service or something like that) that keeps track of the ip and give it is a static name, or you just use a static ip instead (easiest solution...)

Link to comment
Share on other sites

Hi, you either need a DNS-server (dynamic name service or something like that) that keeps track of the ip and give it is a static name, or you just use a static ip instead (easiest solution...)
can't give it a static IP, this router kinda sucks, it's a router-DSL modem with all functions built in, etc.Hmm, dns server... I think that means I would have to go live on the net right?Is there no local way?
Link to comment
Share on other sites

You already have a hostname. Right-click on My Computer, and select Properties. Click the Computer Name tab. Keep your computer name fairly short and one word, if you want to change it you can click the Change button. If you name your computer svr123 then you can type http://svr123/ in the address bar to connect.

Link to comment
Share on other sites

1. The router should have nothing to do with you setting a static ip on a computer in the network (this is done in the network settings on the computer...)2. You could install a DNS-server in your LAN, it isn't hard, but it's harder than setting a static IP...Question to justsomeguy: Haven't use win for a long time, but: can other computer also access that computer with the name??

Link to comment
Share on other sites

INCREDIBLE justsomeguy, thanks a lot!I had no idea about this before, worked fabulously! :)

Link to comment
Share on other sites

Question to justsomeguy: Haven't use win for a long time, but: can other computer also access that computer with the name??
Yeah, I've got it set up like that at home. My personal computer is also my server, and when I'm working on one of the development machines I can access it fine. As long as a computer can find a computer with the name either on the local subnet or through the internet using DNS it should be able to connect.
Link to comment
Share on other sites

When you use a TLD like .com or .net, your computer will go to the root servers for .com to look up the domain name. You don't want it to do that, that's not the computer you are looking for. Your computer is not administered by the .com root servers. My computer at home is named Bigpimp (from several years ago), so I type in http://bigpimp/pma for example to open phpMyAdmin.If you use something like .com then you will need to spoof a .com DNS server on your network and point that name back to your IP in order for it to work, which you would have to update every time your IP changed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...