Ryan Bayne
asked on
Apachi Error OS10048 (Port and IP address issue)
I have the following error on starting Apachi, I am aware that I must change the port however what do I change the IP address to?
<OS 10048>Only one usage of each socket address (protocal/network address/port) is
normally permitted. :make_sock: could not bind to address 0.0.0.0:80 no listening
sockets available, shutting down.
Unable to open logs
NOTE: My PC is for development only and not a web server.
<OS 10048>Only one usage of each socket address (protocal/network address/port) is
normally permitted. :make_sock: could not bind to address 0.0.0.0:80 no listening
sockets available, shutting down.
Unable to open logs
NOTE: My PC is for development only and not a web server.
The IP address 0.0.0.0 is telling us that apache is binding to all unassigned address at port 80. Try making the IP address 127.0.0.1 in your httpd.conf file and then restart apache. The line should be similiar to this: Listen 0.0.0.0:80 so you would change it to Listen 127.0.0.1:80
what is your OS/Version?
Is is possible to see what is the current apache config for "Listen" directive.
recommendation from namol would cause Apache to start and would listen on 127.0.0.1 (loopback), which should work if you are working on the server itself. but if you are working a separate machine, then you may not be able to connect to apache.
by default the configuration should have:
Listen 80
which would cause apache to bind to port 80/tcp on all active network interfaces running tcp/ip.
cheers.
Is is possible to see what is the current apache config for "Listen" directive.
recommendation from namol would cause Apache to start and would listen on 127.0.0.1 (loopback), which should work if you are working on the server itself. but if you are working a separate machine, then you may not be able to connect to apache.
by default the configuration should have:
Listen 80
which would cause apache to bind to port 80/tcp on all active network interfaces running tcp/ip.
cheers.
ASKER
I'm using XP and using Apachi and PHP for development and testing on this computer only. The files are uploaded to the server later. The apachi symbol should show in the tray yes because sometimes when I change the port to a random number and Start it I do not get an error yet I do not have that try icon.
This is the only two lines with one of them not active I changed the port to random numbers but it doesnt seem...
#Listen 12.34.56.78:80
Listen 80
So is it a must that it uses port 80 I need to find out whats using that port and stop it but then what if that program needs port 80!
This is the only two lines with one of them not active I changed the port to random numbers but it doesnt seem...
#Listen 12.34.56.78:80
Listen 80
So is it a must that it uses port 80 I need to find out whats using that port and stop it but then what if that program needs port 80!
>> #Listen 12.34.56.78:80
this would tells apache to bind to port 80/tcp on IP address 12.34.56.78. should be fine if your machine had a fix ip. otherwise may cause problem if your ip is coming from DHCP.
>> Listen 80
would tell apache to listen to port 80/tcp on all active interface.
if apache failed to start -- the apache monitor in your windows stytray is shodwing red, then open a dos prompt, and do a "telnet localhost 80" assuming that your apache is running on port 80.
you should get a blank screen. if any program is running on port 80. otherwise you would get error:
Connecting To localhost...Could not open a connection to host on port 80 : Connect failed
alternately you could do a "netstat -n" to view the network connection:
Proto Local Address Foreign Address State
TCP 127.0.0.1:80 127.0.0.1:3683 TIME_WAIT
TCP 192.168.1.253:80 192.168.1.254:45712 TIME_WAIT
* in my case I had apache running (Listen 80 in the config file)
Or you could grab TCPview tool from microsoft -- which would let you see active program and any network connection. nice tool.
http://www.microsoft.com/technet/sysinternals/utilities/tcpview.mspx
this would tells apache to bind to port 80/tcp on IP address 12.34.56.78. should be fine if your machine had a fix ip. otherwise may cause problem if your ip is coming from DHCP.
>> Listen 80
would tell apache to listen to port 80/tcp on all active interface.
if apache failed to start -- the apache monitor in your windows stytray is shodwing red, then open a dos prompt, and do a "telnet localhost 80" assuming that your apache is running on port 80.
you should get a blank screen. if any program is running on port 80. otherwise you would get error:
Connecting To localhost...Could not open a connection to host on port 80 : Connect failed
alternately you could do a "netstat -n" to view the network connection:
Proto Local Address Foreign Address State
TCP 127.0.0.1:80 127.0.0.1:3683 TIME_WAIT
TCP 192.168.1.253:80 192.168.1.254:45712 TIME_WAIT
* in my case I had apache running (Listen 80 in the config file)
Or you could grab TCPview tool from microsoft -- which would let you see active program and any network connection. nice tool.
http://www.microsoft.com/technet/sysinternals/utilities/tcpview.mspx
ASKER
I'll bump the points up a little once again.
TCPView doesnt show port 80 being used or any port under a 4 digit number!
Could my error message be caused by something else. I would not have thought it would be this difficult to install and use a program on the same machine.
TCPView doesnt show port 80 being used or any port under a 4 digit number!
Could my error message be caused by something else. I would not have thought it would be this difficult to install and use a program on the same machine.
no issue with the points. however, bigger pts would lure more help. pts are like 'rewards' here :)
well I am a bit puzzled too. Do you have Windows firewall running that may be preventing apache to bind to port 80. If you do had it running, disable it for a while, or add exclusion to allow apache to listen on port 80.
I had ran apache on XPSP2 on a number of machine and so far things are good -- never ran into this kind of issue.
any other application/services that may be running -- firewall, antivirus, vpn client, etc.
Personally, I would try to reinstall. I knew that this may not be a favorable choice sometimes, but it would be useful to ensure that we start from scratch.
http://apache.leakage.org/httpd/binaries/win32/
http://apache.leakage.org/httpd/binaries/win32/apache_2.2.6-win32-x86-no_ssl.msi
http://apache.leakage.org/httpd/binaries/win32/apache_2.2.6-win32-x86-openssl-0.9.8e.msi
well I am a bit puzzled too. Do you have Windows firewall running that may be preventing apache to bind to port 80. If you do had it running, disable it for a while, or add exclusion to allow apache to listen on port 80.
I had ran apache on XPSP2 on a number of machine and so far things are good -- never ran into this kind of issue.
any other application/services that may be running -- firewall, antivirus, vpn client, etc.
Personally, I would try to reinstall. I knew that this may not be a favorable choice sometimes, but it would be useful to ensure that we start from scratch.
http://apache.leakage.org/httpd/binaries/win32/
http://apache.leakage.org/httpd/binaries/win32/apache_2.2.6-win32-x86-no_ssl.msi
http://apache.leakage.org/httpd/binaries/win32/apache_2.2.6-win32-x86-openssl-0.9.8e.msi
ASKER
Ye I did consider reinstallation I just get the feeling thats not it. I do have a firewall running but then I assumed because I'm only developing on this machine and using Apachi PHP MySQL for development and testing that firewalls or my router to go even further, would not be an issue.
I'll go into all that see what happens when they are disabled thanks for the advice.
I'll go into all that see what happens when they are disabled thanks for the advice.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
OK One last question then I think we might be able to wrap this up/
http://localhost:90 allows Apachi to run START without error, but still the icon is not in the tray so thats a problem but that directory appears in the brower with the list of files so maybe its not!
PHP files display as '?' is this a problem with my PHP configuration because if so the
http://localhost:90 is good and I'll dish out the points lol
http://localhost:90 allows Apachi to run START without error, but still the icon is not in the tray so thats a problem but that directory appears in the brower with the list of files so maybe its not!
PHP files display as '?' is this a problem with my PHP configuration because if so the
http://localhost:90 is good and I'll dish out the points lol
assuming that you had apache installed with the default option. It would be installed in the following folder "C:\Program Files\Apache Software Foundation\Apache2.2"
Look in the folder "C:\Program Files\Apache Software Foundation\Apache2.2\bin"
there should be a file named "ApacheMonitor.exe"
Run this file -- this is the icon that you would have in the windows systray.
Copy or create a link to this file to your Startup folder to make ApacheMonitor to be running every time you login to the machine.
you could copy/shortcut into "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" so that any user who logged in would get the icon.
the PHP portion -- are you saying you are seeing the PHP code instead of the "result" from the php? if this is the case, probably the PHP setup/configuration is the problem. relook at that. THe readme that comes with PHP should give you some idea on how to setup apache and php together.
cheers.
Look in the folder "C:\Program Files\Apache Software Foundation\Apache2.2\bin"
there should be a file named "ApacheMonitor.exe"
Run this file -- this is the icon that you would have in the windows systray.
Copy or create a link to this file to your Startup folder to make ApacheMonitor to be running every time you login to the machine.
you could copy/shortcut into "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" so that any user who logged in would get the icon.
the PHP portion -- are you saying you are seeing the PHP code instead of the "result" from the php? if this is the case, probably the PHP setup/configuration is the problem. relook at that. THe readme that comes with PHP should give you some idea on how to setup apache and php together.
cheers.