Cannot Get Apache Installed As Service

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cannot Get Apache Installed As Service

Postby jacoels » 15. July 2004 15:29

When I try to install Apache as a service from C:\xampp\apache, I get the following error:

"Installing Apache2 as an Service
(OS 10048)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
Now we Start Apache2
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

Press any key to continue . . ."

The HLPMSG just says that I am trying to start service that is not configured on the system.
I am running XP

I am new to working with Apache and PHP and would really value any help
Thanks!
jacoels
 
Posts: 1
Joined: 15. July 2004 15:07

Postby Kristian Marcroft » 15. July 2004 15:39

Hi,

your Port 80 is blocked by some other Software...
This might be a firewall? a Viriscanner? Skype etc.

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Because it's already started.

Postby SoylentGreens » 17. July 2004 04:34

I just installed the software, so this may not be the answer you're looking for, but here goes my solution (as well as some tweaks).

I got the same error message so I ran xampp_stop.exe, which stops both Apache and MySQL. Then I ran the installservice.bat files for each to start them back up as services...

Apache as a service
ApacheFriends\xampp\apache\apache_installservice.bat
MySQL as a service
ApacheFriends\xampp\mysql\mysql_installservice.bat

I'm not sure if that's the same problem you were having, you may have been smart enough (unlike me) to stop the programs before trying to run them as services. Good luck!

::NOTE 1::
I don't like doing the files seperate, so I created a file in the root directory (xampp) to do it all at once. To do that, open notepad and type

@echo off
cd apache
call apache_installservice.bat
cd ..\mysql
call mysql_installservice.bat

Then save the file as a .bat file. (I saved it as xampp_start_services.bat)
To create a shutdown file, open notepad and type

@echo off
cd apache
call apache_uninstallservice.bat
cd ..\mysql
call mysql_uninstallservice.bat

Then save the file as a .bat file. (I saved it as xampp_stop_services.bat)

Now if you really want it automated, you can edit the original files so they don't give the "Press any button to continue..." message. Do this and they'll just close on their own if everything starts correctly. Open each of these four files in Notepad:
apache\apache_installservice.bat
apache\apache_uninstallservice.bat
mysql\mysql_installservice.bat
mysql\mysql_uninstallservice.bat
and change the very last line from
pause
to
if ERRORLEVEL 1 pause


::NOTE 2::
If you installed the program in a directory path with a space in the name such as "C:\Program Files\apachefriends" you will have to edit the mysql_installservice.bat (in NotePad) adding quotes around paths to account for the space in "Program Files"
So
copy %cd%\bin\my.cnf /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file=%cd%\bin\my.cnf
becomes
copy "%cd%\bin\my.cnf" /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file="%cd%\bin\my.cnf"



I HOPE AT LEAST SOME OF THIS JUNK HELPED YOU OUT! GOOD LUCK AND WISH ME LUCK! :?
- I had to beat them to death with their own shoes.
SoylentGreens
 
Posts: 3
Joined: 17. July 2004 03:12

Postby Kristian Marcroft » 17. July 2004 06:16

Hi,

im Sorry to Say so...

but you don't have to keep installing und uninstalling the Serivce!
Thats not the point of services.

Services Automaticly start on boot and shutdown when you shutdown Windows. Which means, all you have to do is install Apache and mysql as an service, and then just try to reboot...

After reboot Apache and mysql will automaticly boot up.
If you want to stop Apache and/or mysql by hand, you may do this here:

Start -> run -> services.msc

And once installed as an serive you dont have to uninstall until you either move the folder delete it or upgrade...

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby Arris » 20. July 2004 11:39

Good information here.
I had installed xampplite (working) without uninstalling MySQL and decided to clean up any leftovers from my IIS/MySQL/PHP4 install before working properly with an xampplite install. Didn't really think on reboot that skype running would have been a problem but obviously it uses the same ports or something... Thanks for mentioning that Skype could cause problems KriS ;)
Arris
 
Posts: 3
Joined: 20. July 2004 11:32

something's wrong...

Postby chanio » 23. July 2004 07:17

KriS wrote:...

your Port 80 is blocked by some other Software...
This might be a firewall? a Viriscanner? Skype etc.

...


:lol: Hi, KriS!

I have upgraded XAMPP and happen to have the same problem...
I have all what you have mentioned:
Zone Alarm, Norton Antivirus and Skype :shock:

I can't understand why was XAMPP working fine, until I stopped and then uninstalled the service. After upgrading, Apache won't start any more.

And if the port were really busy it shouldn't be possible to start my old WAMPP1 version... And it still works perfectly!

I guess that there is some bad inner assignment at Apache that doesn't mention the 127.0.0.1 address, so it tries to use the 0.0.0.0 one, don't you think so? When the httpd.conf mentions the Listen port it suggests to add the complete address (like 127.0.0.1:80) instead of the 80 alone. And it says something of avoiding letting the server guess the address to be 0.0.0.0 ...

I have also seen that now, every config file adds the Driver letter infront of every file address. That thing of leaving out the relative addresses is going to bring more constraints... If it wasn't for the relative file addresses at the WAMPP1 it wouldn't be working without a proper installation. It would be nice to keep on that phillosofy for future releases. :?:

Instead of making a script to do the installation, there should be a script to find the logical place of the new folders and programs at the distribution dessign.:?:

Please, help!
Code: Select all
Win XP- AMD Athlon XP - 256Mb RAM - Complete Distribution with modPerl + Phython.

Last edited by chanio on 23. July 2004 07:20, edited 1 time in total.
Gallactic Firewall
User avatar
chanio
 
Posts: 72
Joined: 18. March 2003 22:05
Location: Argentina


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 24 guests