Solved

Installing Apache2 and Running it

Posted on 2009-05-08
15
309 Views
Last Modified: 2013-12-13
It's been a while, I've tried to create php pages...with mysql and apache 2.0
but when I try to install this i get an error called

Well.. I actually installed it through the wizard.. and when they told me to put
the server name and all those
I put
localhost
localhost
admin@localhost

I'm using wireless internet service and there were things written on there already
but the guide says erase all that and replaces with those things that I wrote above.
Now when I try to run it, it does not work...
Whenever I start, I get an error like
"No installed service named "Apache2"

so someone told me to manually install;
I went to the apache folder and type
apache.exe -k install -n "Apache2"
and ran it and now i get error like

"Only one usage of each socket address (protocol/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"

So... what should i do to make this work?

Help needed desperately. Please help!
0
Comment
Question by:kmc10314
  • 6
  • 5
  • 2
  • +1
15 Comments
 
LVL 4

Expert Comment

by:ericnils
ID: 24341974
That message indicates that port 80 is already in use by another running process.  It is likely that you successfully started another running apache server and now it is complaining when you try to start a second.  Try looking at running processes and terminating any other instances of apache.exe then trying to launch it again.

If you are using this for development purposes only you may want to look at XAMPP.  It is a point and click setup of Apache2, PHP, MySQL and a whole bunch of other common web development programs.  You will still have to kill whatever process is currently running on Port 80 before installing it though.

http://www.apachefriends.org/en/xampp.html
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24341976
This error message means that some other application, probably the Apache Server from your first installtion is listening to the 80 (default web) port.

What you would do is open to open a browser window and type this in the address bar:
http://localhost

If you get the initial page from the Apache it means that your Apache server is already running. Then go find the configuration files and change the name of your server.

Then go to the documentation section of Apache Website here:

http://httpd.apache.org/docs-project/

Select the appropriate version and pick a doc file to see what are your configuration options and where to find the necessary configuration files on your system.

Cheers,
K.
0
 

Author Comment

by:kmc10314
ID: 24341979
well... I have not started any apache... after supposedly "finished" installation (because installation wizard has been completed)  when I try to run apache I get error like "No installed service named "Apache2"

Which, it seems to me, that no apache has been installed.

That's why I'm trying to install apache and it is not working
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:kmc10314
ID: 24341981
When I try localhost I only get blank page...
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24341989
It seems that there's an incomplete installation and may be it is because you have some service already installed that is listening the port 80.

What platform are you using?
0
 
LVL 8

Expert Comment

by:thetmanvn
ID: 24341998
It looks like you are using a bundle LAMP on Windows. Which one did you try?

You can you xampp on Windows and follow the official well-documented to make it yourself in 5 minutes.

But before that, you should check whether you Windows installed with IIS or not. If IIS was installed before, disable it or change the port for default installation web page of IIS
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 250 total points
ID: 24342015
Go to command line execute this commmand:
netstat -anop tcp | more

and tell me if you see something like this::

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       3728

it means that some appliction si already listening to 80 port. Please note the process id of the program listening to the 80 port. under PID column.

Now launch your porces manager:

Press CTL + Alt + Dell and click "Task Manager"
Click Processes Tab
Click View and slecet "Select Columns..."
Click PID
Click OK
Now click to the PID column and sort the porcesses accordind to their PID's.
Find the process with the ID shown in the first command (3728 in the example above)
Stop the porcess.
Do the install again
Use meaningful names for hostname such as bobpc.localdomain etc..
0
 

Author Comment

by:kmc10314
ID: 24342017
I'm using Windows and I'll look into IIS and get back to you guys on that.
Thanks !
0
 

Author Comment

by:kmc10314
ID: 24342038
Thanks a lot problem solved instantly.
I didn't know Skype uses that port as default. Does that mean I can't use Skype anymore or would it find another port automatically?
0
 

Author Closing Comment

by:kmc10314
ID: 31579706
Thanks please answer to my last questions ^.^a;
0
 
LVL 4

Expert Comment

by:ericnils
ID: 24342042
The "No installed service named "Apache2" error indicates that Apache is not installed as a service.  That does not necessarily mean it is not running as a program.  A service is something that runs separate from your user session meaning that even if you log out it will keep running.  Programs stop when you log out. Apache can run either as a program or as a server on Windows.

Since you are getting a blank page on your local machine and not an error message that indicates that something is running and serving that blank page to you.  Press Control+Alt+delete and go to Task Manager then look in your processes for apache.exe.  If it is there then it is running, just not as a service based on the errors you are receiving.  Rebooting may also solve this problem for you if you have not set Apache to load on startup.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24342048
I know it is windows but a client windows (such as 2K WS, XP, Vista, 7) or server windows (2K, 2k3, 2k8)
Because as you've told you might have IIS installed. If this is the case you need to shutdown (stop) the IIS service during the installation. Because older versions of IIS has a strange behaviour in that it still binds to port 80. Furthermore it refuses to start even if it is bind to a port other than 80 and 80 is already binded by another process/application.


0
 
LVL 8

Expert Comment

by:thetmanvn
ID: 24342050
You can change the listen port in Skype as below:

1.Goto Option -> Advanced -> Connection

2. In the Use port [   ] for incoming connections besure it isn't 80 or be sure the check box Use port 80 and 443 as alternatives for incoming connections was not checked. Hope this help.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24342059
Yup Skype is bind to 80 :)  and thetmanvn is the fastest responding expert in the west :)
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24342065
This PID trick always finds the culprit ;-) so you can save this response for later reference :))

Cheers,
K.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Ahax pagination 9 47
Create link to folder for use with apache. 7 73
EditableGrid how to fetch rows from MySql in php 14 44
$_GET call between URL 3 37
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question