473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

localhost

7
Hi.

I am using Apache Triad (PHP, Apache & MySQL) to run my php codes and connect to my database using a single computer. I'm using Windows XP. All i need to do is open an internet browser and type in the address bar : http://localhost/whatevefile.php with a trial (Mysql) db. apache is installed at C:\apache and i had inserted my folder which contains php codes inside the localhost.

I'm a newbie when it comes to intranets (first time to work in a networking setting) and i am currently tasked to create an enrollment system that requires several office computers to access it (enrollement system and its MySQL database). so i really need help in setting up in a LAN scale. My codes and database connection sure does run without any problem (using localhost) in the computer that i am currently using to develop it.

But my problem is how will this work on a networking scale (LAN)?

I have a several questions:

1. Do i need to install apache triad on each computer? and have each computer run the apache server and mysql-d?

2. what are the other requirements to make this work?

3. can it be accessed by several computers just by typing the link in the address bar: http://localhost/whateverfile.php and connect immediately to the database? or do i need to configure it?

if there are other things that i forgot to ask, pls. do tell me.

thank you very much. your help will be greatly appreciated.

~Shiloh
Mar 30 '07 #1
6 3606
Banfa
9,065 Expert Mod 8TB
You shouldn't have to do much.

Firstly installing Apache/PHP/MySql on every machine is the last thing you want to do, you would be running a server on every machine and everybody would be using their own copy of the database.

You will probably already find that if you go to another computer on the network and instead of

http://localhost/whateverfile.php

you use

http://yourmachinename/whateverfile.php

that the website is already available to everyone.

The only other things you may want to do is

1. Move the whole thing off you machine and on to a dedicated machine

2. Have you IT department set up a DNS entry for the machine so that it will be available at the same name even if it is moved to a different machine.
Mar 30 '07 #2
Cyberdyne
627 Expert 512MB
Great answer above, also you might want to try and run this off the web based interface, in other words get a dedicated website to run this. IIS services or Apache should be sufficient and once you have a domain name on the internet you will be able to secure it by creating https connections with user authentication and one central database. Again this would only be necessary if your networks are far apart, if its all done on the same network simply use a static ip for the machine that's going to run the server and database.

Cyber.
Mar 30 '07 #3
shiloh
7
Hi!

Thank you very much for replying to me. :-D

I know I really sound naïve but I would like to ask if the one you’re referring to “yourmachinename” is an IP Address of the computer? Do I really need to have a single computer solely dedicated to become the server? If that is the case, will a 40GB hard-disk be okay? This is really a small-scale system, catering to less than 1000 students per school year though my boss would like to have it run for a long time.

I don’t have an IT department since I am just a freelance programmer recently hired to do such thing, who is more familiar with web design than creating an enrollment system running on LAN. I do develop systems, sometimes, that only require running localhost in one computer. But I’m very eager to learn how to do this and this is a definitely new experience.

My employer expressed explicitly that he would like the system to be completely off the internet since there is no DSL internet connection available in the office and the computers will be running on a single network and are not far from each other.

Question:
How do I “set up a DNS entry for the machine so that it will be available at the same name even if it is moved to a different machine”?

The only DNS settings I know are the ones that I used in setting up a domain with a webhost.


Many thanks. Hope to hear from you again.

~Shiloh
Mar 31 '07 #4
Banfa
9,065 Expert Mod 8TB
I know I really sound naïve but I would like to ask if the one you’re referring to “yourmachinename” is an IP Address of the computer?
It could be the IP address of the computer but it can also be the actual name of the computer. The computer name is available in Control Panel -> System on the "Computer Name" tab. Or if you type "ipconfig /all" at a command prompt you will get back something that looks like

Expand|Select|Wrap|Line Numbers
  1. Windows IP Configuration
  2.  
  3.         Host Name . . . . . . . . . . . . : BEN
  4.         Primary Dns Suffix  . . . . . . . :
  5.         Node Type . . . . . . . . . . . . : Mixed
  6.         IP Routing Enabled. . . . . . . . : No
  7.         WINS Proxy Enabled. . . . . . . . : No
  8.  
  9. Ethernet adapter Local Area Connection:
  10.  
  11.         Connection-specific DNS Suffix  . :
  12.         Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
  13.         Physical Address. . . . . . . . . : <snipped>
  14.         Dhcp Enabled. . . . . . . . . . . : Yes
  15.         Autoconfiguration Enabled . . . . : Yes
  16.         IP Address. . . . . . . . . . . . : <snipped>
  17.         Subnet Mask . . . . . . . . . . . : <snipped>
  18.         Default Gateway . . . . . . . . . : <snipped>
  19.         DHCP Server . . . . . . . . . . . : <snipped>
  20.         DNS Servers . . . . . . . . . . . : <snipped>
  21.         Lease Obtained. . . . . . . . . . : 31 March 2007 06:32:13
  22.         Lease Expires . . . . . . . . . . : 01 April 2007 06:32:13
  23.  
(I have snipped sensitive data) The computer name is reported as Host Name in the Windows IP Configuration and the IP Address is reported in "Ethernet adapter Local Area Connection". You can use either the IP Address or the Computer Name to connect to the web server on the computer.

Do I really need to have a single computer solely dedicated to become the server? If that is the case, will a 40GB hard-disk be okay? This is really a small-scale system, catering to less than 1000 students per school year though my boss would like to have it run for a long time.
No it is not strictly speaking required. However it would be better because then you can give the computer a name that is descriptive of what it is and it will be easier for people to remember what to type into their web browser to access it. It would be best if the computer is not some ones personal machine as it will be using cpu time and memory to run the site.

Windows is ~ 3GB, Apache, MySql and PHP are ~20Mb each so as long as your site and data are <36Gbyte then a 40Gb hard drive would be fine.


I don’t have an IT department since I am just a freelance programmer recently hired to do such thing, who is more familiar with web design than creating an enrollment system running on LAN. I do develop systems, sometimes, that only require running localhost in one computer. But I’m very eager to learn how to do this and this is a definitely new experience.
But presumably the school already has an IT infrastructure and may well have someone supporting it.

My employer expressed explicitly that he would like the system to be completely off the internet since there is no DSL internet connection available in the office and the computers will be running on a single network and are not far from each other.
That's OK Cyberdyne only suggested that because it is not clear from the initial question if the system was for access from multiple sites or not.

Question:
How do I “set up a DNS entry for the machine so that it will be available at the same name even if it is moved to a different machine”?

The only DNS settings I know are the ones that I used in setting up a domain with a webhost.
You will only need (be able to have) a DNS entry if the school network has a DNS server locally. On a small network of a few computers this is unlikely. A DNS server on a network acts in much the same way the DNS servers on the internet used for setting up webhost domain names. All the computers would know the IP address of the local DNS server, when they need to look up the address of a computer from a name then the contact the DNS server which has a list of domain names and IP addresses. If the school has no servers (i.e. only a network of personal machines) then it wont have a DNS server. Even if it has a central file server it still may not have a DNS server.

In may company which has 1000's of computers and many servers spread across 3 different sites we do have a local DNS server so that the IT department can swap out 1 server for another just with a small change at the DNS server.


Even then some of the computers are contactable just because they are given a sensible name without having a DNS entry.
Mar 31 '07 #5
shiloh
7
hi. been busy. anyway, these are really helpful but i have to chew and digest everything as to ensure i will do it right. thank you.
Apr 5 '07 #6
Euphy
1
Hi, one thing that made me scratch my head when I was trying to do this recently was that on XP, windows firewall is configured as standard to block access to your web server from outside connections unless you tell it otherwise. (I think I'd assumed that Apache might have opened this port when it first got installed.)

So from my laptop I'd try to access http://bigcomp/index.php and it would still come up with an error, even though the server is running fine and my URL was correct.

Once I guessed what was wrong, I went into security centre (in system tools) on Bigcomp and then, under _Manage security settings for Firewall_, I opened Port 80 using the exceptions tab to let network traffic through. Port 80 is the one that most web servers use but this can be configured in Apache if you need a different one.

It works fine now!

Hope this is some help - this thread helped me to get this far, thanks to all involved.

All the best
Sandy
Apr 16 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dave Mateer | last post by:
Hi Why does the following code allow me to keep the same session when in the same sub domain (ie admin.localhost), yet not when I goto another related domain eg main.localhost? I would like...
2
by: Martin Fuzzey | last post by:
I am using xmlrpclib (based on httplib) in Python 2.3 on Mandrake Linux. When my client attempts to connect to a server using a "http://localhost:port" style URL there is a long delay before the...
2
by: Asad Khan | last post by:
Hello, I was using MySQL till a few days ago just fine. Now everytime I try to run it using mysql.exe, I get the following error: "can't connect to mysql server 'localhost' (10061)" What...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
5
by: KenLee | last post by:
help: how can I change from "//localhost:numbers/" to just "//localhost/"? I can see the web pages using "//localhost:numbers/" instead of ""//localhost/". I use asp.net 2.o. and windows 2000....
7
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ...
12
by: John Kotuby | last post by:
Hi all, Maybe this is a simple problem found in ASP.NET 2.0 course 101, but I must have missed it. When I create a page in Visual Web Developer and use URLs like "/images/picture.gif " or a link...
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
1
by: maflatoun | last post by:
Hi all, I've been doing ASP.NET C# for 4 years now and that's around the same # of years I've been away from PHP. But now I'm looking at this PHP position that looks really interesting to me....
3
by: teo | last post by:
I'm developing a software (a WinApp, not a WebApp) to retrieve Date & Time from a web server, but firstly I need to to test it on my PC, with "localhost" I'm using the VB Net language (below...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.