Jump to content

re: help(php/web)


wormytux

Recommended Posts

good day..  i want to thank you guys for the help. now i have a much clearer view. im taking your advice on using zip. another thing, im using xampp and i want to ask some help from you again if i could just type on the browser a name like " www.mypage.edu" instead of typing "locallhost/....."? ??? my pages are local... thank you so much and hoping for your reply.. thank you..

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/
Share on other sites

but don't you have to buy a domain name from a site like GoDaddy.com

 

Changing your hosts file only changes how things are routed in relation to your computer. The hosts file was used a long time ago before DNS, but your computer still checks it.

 

Mine looks like....

 

# loopback.
127.0.0.1       oblivion.tsp.net oblivion        localhost

# lan.
192.168.10.1    firewall.tsp.net                 firewall
192.168.10.2    oblivion.tsp.net                 oblivion
192.168.10.3    utilserv.tsp.net                 utilserv
192.168.10.4    stack.tsp.net                    stack
192.168.10.5    imac.tsp.net                    imac
192.168.10.6    toshi.tsp.net                    toshi

# my (apache) vhosts
192.168.10.3    mysql.utilserv
192.168.10.3    postgres.utilserv
192.168.10.6    proem.com
192.168.10.6    www.proem.com
192.168.10.6    dev.proem.com
192.168.10.6    stage.proem.com

# shortcut to php.net
69.147.83.197   p

# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

 

for instance.

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439458
Share on other sites

Hey, dude.

 

Here's what you can do to fake having a domain (for your own testing):

 

In Windows:

 

Start->Run

 

In the dialog, just paste this: notepad c:\windows\system32\drivers\etc\hosts

 

The file should look similar to..

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

 

Modify the line thusly;

 

127.0.0.1    localhost    www.domain.com domain.com

 

ex:  127.0.0.1  localhost  www.awpti.org awpti.org

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439459
Share on other sites

thanks.

i have windows vista.

and when i try to save it.... it says:

 

Cannot create the

c:\windows\system32\drivers\etc\hosts file

 

Make sure the path and file name are correct.

 

BUT... i'm confused because i went through notepad to open it, so it obviously exists at the exact location...according to my permissions, i can write on system 32 files though.

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439473
Share on other sites

Hey, dude.

 

Here's what you can do to fake having a domain (for your own testing):

 

In Windows:

 

Start->Run

 

In the dialog, just paste this: notepad c:\windows\system32\drivers\etc\hosts

 

The file should look similar to..

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

 

Modify the line thusly;

 

127.0.0.1    localhost    www.domain.com domain.com

 

ex:  127.0.0.1  localhost  www.awpti.org awpti.org

 

 

 

i configured it(127.0.0.1  localhost  www.mypage.com mypage.com)

i still can get it to work. i tried to open the page thru firefox but opens a different page. it opens the xampp splash screen. help... ???

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439507
Share on other sites

good day. finally figured it out ;D. thanks you guys. i have here some steps to follow for someone who might encounter the same situation.

 

steps:

 

1.setting up Hosts

go to run and paste this:

notepad c:\windows\system32\drivers\etc\hosts

add a new line at the end for the offline version of your client site

example: 127.0.0.1    www.mypage.co

save

 

2.setting up virtual host

go to windows explorer

paste this to addbar - C:\xampp\apache\conf

open httpd.conf in notepad

look for a section containing the text NameVirtualHost 127.0.0.1 and uncomment it

if none, paste this below the section of "#virtual hosts" to easily locate it:

 

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>

    ServerName www.mypage.co

    DocumentRoot "C:\xampp\htdocs\mypage"

</VirtualHost>

 

save

 

3. refreshing apache web server

locate the xampp control panel and simply click the refresh button.

(start->all programs->apache friends->xampp->xampp control panel->click refresh)

 

4. last step

open browser and key-in your site

press enter

thats all....

 

 

 

 

...hoping this might help... ;D

 

Link to comment
https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-440482
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.