In this version of wampserver the option "put online" is no longer available, I made a php application with a virtualhost and I would like to put it online or locally on the company's wifi box.
thanks
1 .To put your website in your LAN, u need to know your device's LAN ip address. open your command line and use this command to get your local ip address:
ifconfig
then find your php.ini file to get your apache service port, glue the ip address and port, others in your LAN can visit your website. like: 192.168.1.110:8080
2.to put your website online, there is a whole bunch of stuff u need to learn. please find a article or book, it's hard to explain that in a short reply
Related
I have an application created in php and using MySQL for back-end. I connect to the front-end of application on my PC by typing
(http://localhost:8080/my_data/login.php)
in the browser. the database is in my computer and php files are also in my computer. i don't know how can other users can get access to the application from the browser in their pc..i am not good with networking stuff.
(I am assuming Windows). At your machine at a command prompt type ipconfig to get your IP address:
specific instructions:
click windows orb,
then type cmd in text area
type ipconfig and press enter
line reading IPv4 Address will have an IP address x.x.x.x... use that IP address in place of localhost.
Assuming others on network are within the same subnet and not have vlans and what not, it should work.
a URL uses something called DNS or a hosts file to lookup that name and translate that common name to an IP address, by specifying the IP address and port, you avoid the need for the DNS, assuming the IP address is "Routable" for the users needed to access it.
Here's an example: Type http://74.125.225.176 in a browser and you get google search! There's a lot more to this really, but this is just the basic workings.
I have downloaded WAMP server and i have written a very very simple php code and saved it in
C:\wamp\www\php_lear
folder. I have tested it using chrome giving url as
{localhost/php_lear/eg2.php}
And it worked fine. This uses a database stored in phpmyadmin. I found out my ip address from google 117.195.230.41. When i give
{117.195.230.41/php_lear/eg2.php}
as URL it gives me 404 not found
"The requested URL '/php_lear/eg2.php' was not found on this server"
Please help. I have no knowledge of ips and urls and very new to this field and yeah i have added this ip as allowed user in phpmyadmin. I actually want to use this in my android app.
The IP address you get from google is the IP address of your router. It does not point to your computer. As some ppl said, besides there is different ports to use in a connection and your WAMP installation is "listening" on the port 80 of your computer (127.0.0.1)
When you access to the 117.195.230.41 you are accessing to the IP that your Internet Service Provider gives to your installation. So you need to access your router and redirect all the querys to the 117.195.230.41 on port 80 to your port 80 and the IP of your computer in your local network.
The Public/Private IP confusion is a common misunderstanding.
Mike is correct. Due to how IP addressing works, there's a limited number of addresses. As a result, Network Address Translation was born (among other irrelevant things). The Public IP is what the world sees when it glances at your traffic. You want your Private IP, the one your router's DHCP has given you.
1) Open command prompt.
2) Issue the command "ipconfig" (without the quotes).
3) Find your "IPv4 Address". That's the one you want.
Additionally, follow Surt's suggestion to get everything working properly.
I don't think if it's possible, but I would like to bring my server temporarily online.
The thing is, I have been working on a PHP project lately from my home computer, and I need to show the progress to my follow team mates on their PC. Unfortunately I cannot go to them, but I wish if my website could.
We don't have a registered domain for it yet.
It's an APACHE v2.0 server installed, running PHP 5 and MySQL at the same time.
Is there some way I could possibly do that.
I heard some where that it's possible with Forwarding ports on DNS using static IP address or something like that. I am using Internet Connection using a HUWAEI Data Card Modem Model: E1550. Unfortunately, I cannot forward ports wit hit.
Any possibility I could share the website temporarily?
Why not just open up a free hosting account on a real good free host service like 000webhost, export your local database, upload your site to the remote host using ftp, then import your databases export file into the remote host's mysql and share the link to your site with your buddies?
That's what I do.
Install and set up Apache properly
Forward port 80 (or other, if you want) to your local IP, through your gateway settings
Register with your IP on DynDns.org or no-ip.org or something like that.
Edit: Well, you said "temporarily", you can just forward port 80 to your local IP and be happy with your "http://xxx.xxx.xxx.xxx/" but beware that it will change whenever you restart the router, or reestablish the connection.
What #MarkoD said, but until then -
If you have access to your router's firmware, you forward ports from there, not your actual PC. Just forward the port Apache is listening on, then put WAMP/XAMPP online.
Once it's online, share your IP and the port you chose with your team mates and they should be able to connect.
The link should look something like: http://111.111.111.111:2222.
For example, Cox Communications doesn't allow outgoing data on port 80 or 443, so use 8080
http://111.111.111.111:8080
If your ISP does, then just use 80 and drop the :xxxx.
I'm new to PHP, so I don't know how to explain it. I'm running WAMP on my computer and I would like to be able to access my localhost from another computer.
Is it possible? How can I do this?
This is provided that all machines are on the same network and that you have
administrative privileges on the machines (you'll have to edit some system files).
You can easily do this but it would have to be a manual process.
You have to create an entry in the hosts file -
On Windows machines is is located in %SystemRoot%\system32\drivers\etc\hosts
On UNIX like systems it is located in /etc/hosts
http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system.
See the link for details on where your hosts file is located. It depends on the operating system.
The following will have to be done on every machine that you would like
to have access to your localhost machine.
Add a line at the very end of your hosts file similar to this :
10.0.0.42 prathyash-localhost.com
The IP address (in the example above it is 10.0.0.42) is the address of your localhost; Your computers IP address. The domain name (prathyash-localhost.com) is what is mapped
to the IP address.
After you save that file, whenever that computer points to prathyash-localhost.com, it will be directed to your IP address. Firewalls are still a barrier - however the other answers covered that so I will not repeat their contribution.
Depending on your situation, manually editing tens maybe hundreds of files might not be feasible. In this case, you might want to consult the networks administrator (he probably hangs around on Server Fault), and he may have a better solution for you.
This problem can be fixed as follows.This is for one using a wamp server or a similar local server.
first ensure that you have modified the httpd.conf.scroll until you find this line:
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
If you have a smartphone turn on your wifi hotspot to connect with your pc and the one you want to connect with.
Open the command prompt in your pc and type ipconfig. Note down the ip4 address of your pc (eg. 192.168.43.47) under wireless LAN adapter Wireless Network Connection.
In the pc you want to connect to set "Obtain IP address automatically".
Before you connect ensure your wamp server is online.
Open the browser of the client pc and type the IP address noted down earlier.This should work just fine. In some cases you may be required to switch off your antivirus.
Yes if they are on the same network, simply target the computer's IP address and ensure anything on either computer that would block access to port 80 (firewalls) is off
#Shaun Hare explained it pretty good, however, if those computers are not in the same network (my case, when remote presentation is needed) you would also need to set port forwarding on your router and remote side would need router's public IP address.
Basically, remote side would enter http://123.123.123.123/index.php in their browser and router would point that request (via port forwarding) to WAMP server installed at 192.168.10.10 (for instance).
You can't. Bind the appropriate daemon to 0.0.0.0/:: or an external interface and use the machine's IP address.
If it's for testing you could use a service like http://localhost.run/ or https://ngrok.com/ to temporarily put localhost on the internet.
Post forward port 80 on your router configuration. Start wamp. Now when your IP address is accessed from any external machine it will jump to the "www" folder and show the index file. If you are not able to do so, it means your firewall is blocking the request: Disable it and try again.
You could just tinker around the firewall. I found that the inbound and outbound rules were blocking all public network traffic (that is, all traffic to my router which is seen as public, even though it has a password) and proceeded to check the box to allow traffic on a public network (both inbound and outbound) for all the rules bearing the Apache name. Also, I did turn on the mySQL server, but that shouldn't do anything at all in this matter (though life has surprised me like this before where something insignificant turned out to be quite significant in the end, so I would do this as a last resort, but unlikely). Also, I think this should work at least over the same WiFi network (and I know that's a part of LAN, but just to clear up any ambiguity) since I only tested with my Android phone (oh how I wish I had a Windows Phone). Hope this of any use to anyone!
If I'm on a local network is there a URL that I can type that will allow all users on the local network to view a local hosted website?
There is one feature called put online but I would need to be connected to the internet. Can it be done another way?
I know this question is off subject but I get fast responses here. and its somehow related :)
You can use either your local IP or your hostname on the network.
For the hostname to work, your network needs a DNS server that updates itself from DHCP, or has a static entry for your computer, or all the systems need to have NetBEUI running. If you can type "ping " in a command prompt/console window, and it shows it pinging your network IP, then it works.
they have to enter your ip
You could use your local network IP address to address your machine. But you have to configure your webserver to deliver the right content without a specific host name.