p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: [Fwd: Re: Working Offline to test PHP scripts, How - to!]


Message #1 by Paul <pagin@k...> on Mon, 16 Jul 2001 21:39:05 -0400
Oh, wait! I just wrote everything below before I thought about this.

Sounds like

your laptop is looking for a GATEWAY (route to the Internet). I have the

same

problem with my Linux system when Internet Connection Sharing is off. My

browser

will hang for a while, sometimes until I kill it. If I remove the

gateway

setting, it works fine. Try it.



(With Linux it's easy to work around. I don't set the gateway until I

need it.

All I have to do to add the gateway is type in "route add default gw

192.168.0.1". In Win2k it isn't as simple, but, unlike other versions of

Windows, you shouldn't have to reboot after making the change.)



This is what I was thinking before...



Just do a search for "hosts". You should find sample files called

"hosts.sam"

and "lmhosts.sam". You can rename them or create new files without the

".sam"

extension. No need to reboot.



The 192.168.x.x range of IPs are private addresses. They are not used on

the

Internet. However, if you host name is registered on the Internet, you

could

still end up with a problem because your name will resolve to a

different IP. (I

don't think that's the case here.)



When your system tries to resolve a name to an IP, or resolve an IP to a

name,

it goes through a search order starting with the hosts or lmhosts file.

Then it

will try DNS servers. You want your system to find what it wants before

it tries

to use DNS. Just make an entry like "192.168.0.12 hummingbird".



Maybe it has a problem with the name not being a FQDN (fully qualified

domain

name), such as "www.hummingbird.org".





Tan Le wrote:



> Thanks for your insight.  I am still not sure.  I am using win 2000 and

> IIS.  The server is http://hummingbird. I store all html and php files

> under C:\Inetpub\wwwroot.  Since it is a client computer with IP

> 192.168.0.12 (something like that), it keeps looking for that when it's

> offline.  In IIS, the IP address is (All Unassigned) and Home Directory

> is c:\inetpub\wwwroot.  I don't see C:\WINDOWS\HOSTS or

> C:\WINDOWS\LMHOSTS that you mentioned.  Can you shed more light?


  Return to Index