Page 1 of 1

Laptop domain name

PostPosted: 15. February 2009 21:16
by adfarley
I have installed XAMPP from scratch on my laptop (running Windows Vista) and all seems to be OK at first - Apache XAMPP startup page comes up OK.
I want to use it to develop my website - written using php.
I have amended the httpd.conf file to point to the document root where my php files reside and then putting localhost into the URL my index page comes up OK so all seems well. BUT when attempting to access other php files the web browser comes up with 'Cannot find page' and it seems as though the browser is looking for http://laptop/<filename> rather than http://localhost/<filename>.
It appears that the system doesn't know what laptop means. I have searched all of the config files but can't find anything that relates to defining laptop as localhost.
Can anyone help please?

Re: Laptop domain name

PostPosted: 15. February 2009 22:07
by Wiedmann
BUT when attempting to access other php files

You mean you click on a link in your "index.php"?

Re: Laptop domain name

PostPosted: 16. February 2009 17:16
by CasaDyD
You can try to add 'laptop' in your HOSTS file and make it point to the IP of localhost (127.0.0.1)

The HOSTS file can be found in c:\winnt\system32\drivers\etc\

The file is just named HOSTS, no extension.
Just add following line to it :

127.0.0.1 laptop

Re: Laptop domain name

PostPosted: 25. February 2009 10:58
by adfarley
Thanks for the advice on making changes to the file 'hosts'. I am having difficulty editing that file - WIndows Vista complains about that, I guess because it's properties are ste at 'ReadOnly'. I have attempted to change the file property so that I can edit it but still no success. I guess this may be because the whole Windows/System32/drivers/etc/..... set of folders are all set to be 'ReadOnly'. I am a bit anxious about attempting to change the proerties of the whole Windows/System32 ... folders and subfolders set to not 'ReadOnly'. Is there any way that I can edit the 'hosts' file using regedit - or is it OK to change the Windows/System32..... folders to not ReadOnly? Any further advice would be appreciated.

Re: Laptop domain name

PostPosted: 25. February 2009 11:02
by Wiedmann
Is there any way that I can edit the 'hosts' file using regedit - or is it OK to change the Windows/System32..... folders to not ReadOnly? Any further advice would be appreciated.

What's about reading the manual for your os?
--> http://support.microsoft.com/?scid=kb%3 ... &x=13&y=10

Re: Laptop domain name

PostPosted: 26. February 2009 09:03
by adfarley
Thanks for the pointer to the known unhelpful feature within Windows Vista regarding editing the system file 'hosts'. That has worked and now I can develop my website using Apache. All seems to be well. Thanks to everyone who helped. I have to say that Windows Vista does not seem to be an improvement on XP !!