XAMPP and Windows 7 Pro

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

XAMPP and Windows 7 Pro

Postby architec » 11. September 2009 09:56

Hi,

I'm running Windows 7 Pro and have just tried to install XAMPP 1.7.2. The installation appears to complete successfully but Apache won't start.
I found a page on FlickR (http://www.flickr.com/photos/invokedprojects/3265495662) which appears to indicate it will run if you lower the UAC settings. I've tried this, but it still refuses to work.

I clicked on the Port-Check button in the XAMPP Control Panel and get the following results. (Should Port 80 have a Status of SYSTEM?)

Any advice / help / or beta versions that work with Windows 7 would be appreciated :D

Al.

XAMPP PortCheck v1.4 by (c) 2009 Carsten Wiedmann (FreeBSD License)
Send bug reports to the author at <carsten_sttgt@gmx.de>,
or go to the XAMPP homepage at http://www.apachefriends.org/.

This script uses openport.exe:
Copyright (C) 2005 Diamond Computer Systems Pty. Ltd.
Official website: http://www.diamondcs.com.au/

Please wait a moment...


RESULT
------

Service Port Status
=========================
Apache (HTTP) 80 SYSTEM
Apache (WebDAV) 81 free
Apache (HTTPS) 443 SYSTEM

MySQL 3306 free

FileZilla (FTP) 21 free
FileZilla (Admin) 14147 free

Mercury (SMTP) 25 free
Mercury (POP3) 110 free
Mercury (IMAP) 143 free
Mercury (HTTP) 2224 free
Mercury (Finger) 79 free
Mercury (PH) 105 free
Mercury (PopPass) 106 free

Tomcat (AJP/1.3) 8009 free
Tomcat (HTTP) 8080 free

Press <Return> to continue.
architec
 
Posts: 3
Joined: 10. September 2009 16:38

Re: XAMPP and Windows 7 Pro

Postby Wiedmann » 11. September 2009 13:17

(Should Port 80 have a Status of SYSTEM?)

That's the reason XAMPP/Apache can't start, because there is already a server running which is using the Apache port 80.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP and Windows 7 Pro

Postby architec » 11. September 2009 15:24

Thanks. It appears that Windows 7 has a service called http.sys which starts automatically and uses port 80. To get around this (without hacking the registry and deleting stuff) you just need to install XAMPP and set Apache HTTP to run as a service using the XAMPP Control Panel. Once you've done this reboot your PC. When your PC restarts, the XAMPP Apache HTTP service starts before http.sys and is able to grab port 80.

If anyone's interested I found the solution online at http://www.cameroncooke.com/2009/01/25/windows-7-uses-port-80-and-makes-it-impossible-to-install-apache-solution/. If the "Start As a Service" option doesn't work for you, there are some other things you can try.
architec
 
Posts: 3
Joined: 10. September 2009 16:38

Re: XAMPP and Windows 7 Pro

Postby buckmajor » 12. May 2010 12:22

Thank goodness I found the solution here. I'm in the same boat trying to use Xampp. I will post back if any problems occur.
Sweet!
buckmajor
 
Posts: 2
Joined: 12. May 2010 12:19

Re: XAMPP and Windows 7 Pro

Postby buckmajor » 12. May 2010 13:32

Sweet! I got it going.

Someone recommended this:
I have an alternate suggestion for Windows 7
In general, messing with the ports that your Operating System is using just seems like a bad idea, you’ll end up with weird network issues like printing
In addition, I need to have IIS running locally as well for the .NET projects I take on so having two web servers listening on different ports was important.
For me the best situation was simply to change the IP Port that Apache listens on (the default is port 80, which is the standard for all web traffic).
I changed mine to port 8666 (but it could be anything above 1024), I did the following:
Locate the httpd.conf file in the following directory [install directory]\xampp\apache\conf (mine was in, C:\xampp\apache\conf)
Find the line that says, Listen 80 and I changed it to Listen 8666. Save and Close the file and now Start the Apache service in the Xampp control panel. Life should be good.
Now the only catch to this method is that you can’t just go to http://localhost/xampp anymore you have to tell your browser which port specifically to use (it will by default use 80), so you will have to use http://localhost:8666/xampp/ (the port is designated by the colon and then the number).
The cool thing is I can run http://localhost:8666 to run Apache and http://localhost:8616 to run my local IIS for .NET projects.
I hope this helps someone
Jeremy

It works perfectly :wink:
buckmajor
 
Posts: 2
Joined: 12. May 2010 12:19

Re: XAMPP and Windows 7 Pro

Postby LucaE » 03. July 2010 21:08

My dear chaps, you probably were appeased with this topic thinking it was a solved one.. afraid that's far from being so.. :(

Just finished trying everything found turning every stone in sight.. no more unturned stones around, but still Xampp Apache on Win Seven refuses to start.

Here's the full report - Here are the investigation's steps:

- Notice: prior to ensuing steps I installed in a Windows Seven Operating System stand-alone versions of Apache, MySQL and PHP, and they all worked.

- Create and format partition, then install Windows Seven Pro in it; works fine.

- first action immediately after installing Operating System: install Xampp 1.7.3 Win32:
Run its executable, Install Folder: C:\Program Files (x86), automatically runs command line executable asking: Relocate paths? Yes. Portable? No. Start Control Panel? Yes.
Control Panel Opens: fine, all applications not checked as services.

- first test after install:
In Control Panel, press Apache Start button, Control Panel text window says: Busy... Apache started, but no green flag appears to the left of Start button, whic do not turn to Stop.
Notice: first attempt to Start Apache just after boot seems to light the green flag for a second, then it disappears.
Try to install Apache as a service by checking Svc checkbox in XAMPP Control Panel: Pauses then fails.
Try to install Apache as service as above and then reboot. Takes some time to answer, then fails again.
Notice: MySQL runs fine.

- check hosts file: does the Operating System know it has to serve requests for localhost and 127.0.0.1 locally?
Inspect file: C:\Windows\System32\drivers\etc\hosts
here's it, part of:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Everything seems to be commented out here.
A little searching about What does 'localhost name resolution handled within DNS' mean, seems to return that "now your browser does not consult hosts file anymore before asking a remote DNS server". Right?
Moreover, as it says it maps IPs to host names, it should follow that IP should work regardless of host names, isn't it?
So this is the conclusion, and please correct me if it's wrong:
if one asks for "localhost", the machine seeks its corresponding IP, regardless of where it seeks it, either in local hosts file or in a remote DNS server; anyway localhost is translated to 127.0.0.1.
and 127.0.0.1 is standard for "this vary machine" anyway.
Just in case, try to uncomment this line: "127.0.0.1 localhost" and reboot, to no avail.
So much for the hosts file, then.

- check port 80: anyone listening here, on HTTP standard port 80?
I know about Skype using port 80 by default and ensuing need to move it to another port. Does not apply here: Xampp is the only application installed here on a clean

Windows Seven just installed.
So: Command Line Prompt\netstat -a
Result: nobody on port 80 here.
It seems Apache cannot start despite port 80 free.

- check further web services: are there other web servers/services running I don't know of - either using port 80 or another?
Check this suggestion: "Stop the service "World Wide Web Publishing Service" because it use port 80.". Start Menu\Run\msconfig\Services sports no such name.
Check a suggested IIS Microsoft Web Server: Control Panel\Programs\Programs and Features\Turn Windows Features on or off. There are two items listed whose name begins

with "Internet Information Services", both of them fully off. Moreover, no "World Wide Web Publishing Service" here.
It reasonably seems no web service alive here.

- check Apache settings: does it listen to localhost/127.0.0.1 port 80?
Inspect file: C:\Program Files (x86)\xampp\apache\conf\http.conf
where there are the following rows:
Listen 80
ServerName localhost:80
DocumentRoot "C:/Program Files (x86)/xampp/htdocs"
on the other hand, no mention at all of 127.0.0.1
Try to change "Listen 80" to "Listen 127.0.0.1:80" to no avail, and then reverse it to original state.
Try to change in httpd.conf Listen directive to :8000, and try it with both Apache checked as Svc and not. Nothing.
Notice httpd.conf file includes lots of further config files into "extra" subfolder, one of them named httpd-xampp.conf.
Hardly a conclusion here: I'm not sure Apache is set to listen to 127.0.0.1 without explictly writing 127.0.0.1 somewhere in its config file.

- check test page: is it there, one never knows..?
indeed, here's it, matching DocumentRoot above: C:\Program Files (x86)\xampp\htdocs\index.html

- try stopping the firewall
stop it for both private and public networks. Nothing.
Notice there is no antivirus installed on this Operating System.

- try program compatibility trouble shooter:
and tell it Xampp is what I'm having problems with.
Start program with applied "Windows compatibility mode: Windows XP (Service Pack 2): Nothing.
Start program with applied "Windows compatibility mode: Windows XP (Service Pack 3): Nothing.
Start program with applied "Windows compatibility mode: Windows Vista: Nothing.

- assorted suggestions, one never knows..

Stop a service called BranchCache: Start Menu\Run\services.exe\a service called BranchCache: originally it is set as Startup: Manual, Status: None. Disabling it and rebooting is of no avail

Stop a service called http.sys: Start Menu\Run\services.exe\ nor Task Manager\Services\: http.sys does not appear to be even present.

add the following registry entry:
1) Launch RegEdit:
2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3) Add a new DWORD (32-bit) value
4) Name it ‘NoRun’ not including the quotes
5) Double click the new property
6) In the Value data field type ‘1' not including quotes and click OK
7) Re-boot your computer
No avail.

Try this other registry entry:
1) Launch RegEdit:
2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3) Find a DWORD (32-bit) value ‘Start’ not including the quotes
4) Go to the properties
5) In the Value data field type ‘0' not including quotes and click OK (Factory value is 3 - three in figure)
6) Re-boot your computer
No avail.

suggestion: "It appears that Windows 7 has a service called http.sys which starts automatically and uses port 80; set Apache to run as a service so that at boot Apache grabs port 80 before http.sys does."
Start Menu\Run\msconfig\Services and Start Menu\Run\services.exe\ show no http.sys thing. Notice the lists they show are not identical.

suggestion: change port Apache listens on from 80 to another.
tried it to no avail.

Whole stuff starts getting on my nerves.. :evil: , particularly in view of the fact that Apache, when previously installed by itself, worked. :?

Anyhow, this is a riddle that's ought to be solved, so.. any idea? :shock:

Quite a lot of thanks in advance..

REFERENCES:

viewtopic.php?f=16&t=37143

http://www.cameroncooke.com/2009/01/25/ ... -solution/

http://stackoverflow.com/questions/8133 ... he-problem

http://serverfault.com/questions/4689/w ... itself-why

http://stackoverflow.com/questions/1416 ... sp-net-mvc
LucaE
 
Posts: 4
Joined: 30. June 2010 12:28

Re: XAMPP and Windows 7 Pro

Postby JonB » 03. July 2010 21:45

Its getting confusing, LOL.

# 1 - what folder is XAMMP installed to? (did I miss that somewhere)?

#2 - Was the standalone version of Apache formally uninistalled?

You might look in the Windows Services Manager to see what it thinks is going on. If there is an Apache service running, the properties can tell you what executable is running and where it is located.

BTW - XAMMP is registry agnostic, so other than looking for something else 'starting', its a dead-end.

I can say in all honesty, I have a Windows 7 Pro 32 bit box that XAMPP runs on. No special steps (that I can recall), I installed it to C:\xampp.

Unfortunately at the moment, that Win 7 box is an hour and a half away. so no way to check it now. :(

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: XAMPP and Windows 7 Pro

Postby Altrea » 03. July 2010 21:56

LucaE wrote:- first action immediately after installing Operating System: install Xampp 1.7.3 Win32:
Run its executable, Install Folder: C:\Program Files (x86), automatically runs command line executable asking: Relocate paths? Yes. Portable? No. Start Control Panel? Yes.
Control Panel Opens: fine, all applications not checked as services.


NEVER install xampp in Folders with white-spaces or Special Chars (Brackets) in the name.
Just install xampp into the root folder of your hdd. Thats the recommand installation-path.

LucaE wrote:Anyhow, this is a riddle that's ought to be solved, so.. any idea? :shock:

Ever tried to start Apache in the cmd?
Maybe a look in the Apache error.log file does give hints what wents wrong.

Thats the way i installed xampp on my Win7 64Bit os:
- Start the self-extracting Installation-file as Administrator (over the right-click context menu)
- Install xampp in the recommend path C:\
- setup_xampp.bat file should open automatically and answer all questions like your needs.
- Start the XAMPP control Panel as Administrator too
- Start Apache and MySQL in the control panel

Thats all. Two additional hints:
- If Port 80 is blocked by SYSTEM process, tick the svc-checkboxes. Run Apache as Service does do the trick in most cases.
- if another program blockes any port and you don't want to change the config file of these programs, change the listening port of the corresponding xampp application.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: XAMPP and Windows 7 Pro

Postby LucaE » 04. July 2010 17:21

Dear JonB, dear Altrea,

JonB wrote:# 1 - what folder is XAMMP installed to? (did I miss that somewhere)?

Yep, I installed it in:
C:\Program Files (x86)\xampp

JonB wrote:#2 - Was the standalone version of Apache formally uninistalled?

It's a fresh install: newly created and formatted partition, new OS install, and then installed XAMPP right after that. Nothing else installed in-between.

JonB wrote:You might look in the Windows Services Manager to see what it thinks is going on. If there is an Apache service running, the properties can tell you what executable is running and where it is located.

Hmm.. you mean Start Menu\Run\msconfig\tab Services? No Apaches there. Just Scotsmen, Mharajahs, North Pole Ice Cream salesmen, things like that.

JonB wrote:BTW - XAMMP is registry agnostic, so other than looking for something else 'starting', its a dead-end.

You mean that Xampp is a sort of portable thing, in that it does not write anything in the registry?
Indeed, being this the case, this parks registry issues far out of sight.

JonB wrote:I can say in all honesty, I have a Windows 7 Pro 32 bit box that XAMPP runs on. No special steps (that I can recall), I installed it to C:\xampp.

You're lucky..
By the way my Pro is 64bit.
So you say you installed it in C:\xampp.
Hmm.. see below:

Altrea wrote:NEVER install xampp in Folders with white-spaces or Special Chars (Brackets) in the name.
Just install xampp into the root folder of your hdd. Thats the recommand installation-path.

Hmm.. interesting clue Altrea..
Going to test it at once.

Altrea wrote:Ever tried to start Apache in the cmd?
Maybe a look in the Apache error.log file does give hints what wents wrong.

Do you mean running either:
(install folder)\xampp\apache_start.bat
or from command line:
(install folder)\xampp\xampp_cli.exe start apache?

About Apache error.log, here's its contents:
a whole set of rows, all the same, which read as follows:
Syntax error on line 505 of C:/Program Files (x86)/xampp/apache/conf/httpd.conf:
SSLSessionCache: Invalid argument: size has to be >= 8192 bytes
Does that shed some light..?

Altrea wrote:Thats the way i installed xampp on my Win7 64Bit os:

Indeed that's exactly how it ought to be, and how I did, step by step.

Thanks for now; now I'm going to:
move xampp folder to C:\xampp
run C:\xampp\setup_xampp.bat to update setup folder and see.

LucaE
LucaE
 
Posts: 4
Joined: 30. June 2010 12:28

Re: XAMPP and Windows 7 Pro

Postby Altrea » 04. July 2010 17:43

LucaE wrote:About Apache error.log, here's its contents:
a whole set of rows, all the same, which read as follows:
Syntax error on line 505 of C:/Program Files (x86)/xampp/apache/conf/httpd.conf:
SSLSessionCache: Invalid argument: size has to be >= 8192 bytes
Does that shed some light..?


Exactly what i thought. NEVER install xampp in a folder with white-spaces and special chars.
That is your Problem.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: XAMPP and Windows 7 Pro

Postby LucaE » 04. July 2010 18:37

Yep, Altrea, let's open the gates to enthousiasm, as you provided the solution! :idea:
Very well done Altrea, thanks quite a lot and thanks JonB, for shedding a light of hope that led us poor pilgrims out of the tunnel. Phew! :D
Wouln'd it be a nice idea to celebrate it here by summing up the results for the sake of search engines, so that all those poor chaps wandering out there may find their way to relief? So..

SOLVED! SOLUTION:
Can't run Apache? Apache refuses to run? Try this FIRST:
Xampp install path must NOT have special characters in it. Spaces are allowed, round brackets are NOT allowed, other special characters have to be tested.
The reason is that Apache does not start if Xampp install path contains special characters such as round brackets.
In my humble opinion, this is the first issue to check if Apache refuses to start, and this is the first reason why Apache may refuse to run on Windows Seven or Vista: if one installed Xampp under, say, C:\Program Files (x86)\xampp, apache will not start due to those round brackets "(" and ")".
It's enough to move xampp to, for instance, C:\Program Files\xampp, and everything's fine and running smoothly.
It might also be that Apache itself will be prone to that whether istalled within Xampp or not, as a stand-alone, and perhaps regardless of the operating system as well, whether Windows, Linux, Mac OS, or whatever.
Silly, isn't it?
Indeed it'd be a good issue to submit to Apache developers.
Because it's just too silly to be stopped ans puzzled for who knows how long by such a silly thing. :?

Dear Altrea, dear JonB, my dar chaps, hope you imagine how you made me happy! :lol:

Thank you!!!!!
LucaE
LucaE
 
Posts: 4
Joined: 30. June 2010 12:28

Re: XAMPP and Windows 7 Pro

Postby JonB » 04. July 2010 18:49

Luca -

I'm glad you got it working. And - Yes, XAMPP is portable. (that is a wonderful thing - I literally keep one of my development sites on a 4GB thumbdrive, very handy!). :mrgreen: I can work on it whereever I am! :D

Good Luck with your projects.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: XAMPP and Windows 7 Pro

Postby Altrea » 04. July 2010 18:52

LucaE wrote:Spaces are allowed

Well, this can cause other Problems with *nix based Components.
e.g. There are known problems with perl on folders with white spaces.

Thats why it is recommend to install xampp in the root directory of your HDD.

LucaE wrote:In my humble opinion, this is the first issue to check if Apache refuses to start,

In my opinion the first thing to do if Apache won't start is to take a look into the error.log file. This can give hints why Apache won't start.
In your case your problem could have been identified and solved in a few minutes.

LucaE wrote:and this is the first reason why Apache may refuse to run on Windows Seven or Vista: if one installed Xampp under, say, C:\Program Files (x86)\xampp, apache will not start due to those round brackets "(" and ")".

This (x86) Folder is only present on 64Bit based Versions of Vista, Windows 7, Windows Server 2003 and Windows Server 2008. On 32Bit based Windows OS there is no such Folder.
In this Folder Windows installs all programs which are 32Bit based. Why Windows does this separation, i don't know. But it should have a reason.

LucaE wrote:It's enough to move xampp to, for instance, C:\Program Files\xampp, and everything's fine and running smoothly.

well, program files is the folder for the 64Bit based programs, so this can produce other problems.

LucaE wrote:Dear Altrea, dear JonB, my dar chaps, hope you imagine how you made me happy! :lol:

I'm glad that your problem is solved :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: XAMPP and Windows 7 Pro

Postby LucaE » 05. July 2010 12:39

Dear Altrea,

Indeed, as usual enthousiasm tends to make one a bit uncaring about details.. particularly when one's a bit ignorant on the subject as well as I do.. beg your pardon!

Again, thanks for such further useful details for the benefit of all future readers!

Spaces can cause problems in *nix based components.. and perl? Good to know even if I don't know a thing about it now.

First look into error.log file: You're right: it's my fault not having any idea what the file contents quoted above means.

As to (x86) folder, I share your views: it'd be for 32bit software on 64bit OSes, and one guesses there has to be a reason.
I did not moved xampp folder to C:\Program Files\, actually: I created C:\Program Portable\xampp.
Wonder what kind of messes may arise by putting 32bit software in that 64bit Program Files folder.. particularly wondering how does software choose which folder to install in when running setup.. no idea at all.

Dear JonB,

I share the appreciation for Xampp being portable. Particularly when I think of stand-alone versions of its component parts, as I tried installing them before and setup processes made me think they make changes to the registry. If that's the case, I don't know how it's possible that xampp is portable, whatever..

Let's go back to work: thanks a lot for the good luck, and quite the same to both of you!


LucaE
LucaE
 
Posts: 4
Joined: 30. June 2010 12:28

Re: XAMPP and Windows 7 Pro

Postby Storyman » 24. August 2010 07:21

The posts in this thread were of great help in leading me to resolve an XAMPP 1.7.3 install on a Windows 7 Pro, however the solution differed from those offered.

In the process of hunting down the reason neither Apache nor MySql would start found that Apache would start--not from the Xampp CP but instead by double clicking 'apache_installservice' in the apache folder. Yes, Apache ran. Unfortunately, it would not auto start on reboot.

In the services manager Apache was on automatic. (Right click on Computer in the start menu, then select Manage. On the bottom left click on Services and Applications, then Services.) Everything looked good until Apache2.2 was right clicked. The problem was immediately revealed. The 'Path to executable' was pointing to a previous version of Apache that was installed in a different folder. The trick is to highlight & copy the full address, the go to 'regedit' and do a search for what you just copied. The old address can be modified using modify. Be extremely cautious when working with the register because if you screw it up and thought you had a headache of a problem before you'll end up with a problem unlike anything you could imagine. In fact CYA by making a backup of the register before you do anything.

The same procedure resolved the MySql problem too.
Storyman
 
Posts: 1
Joined: 24. August 2010 07:00

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 123 guests