xampp & apache port

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

xampp & apache port

Postby stevep » 29. November 2011 12:52

Hi,
First let me say nice project - a convenient way to have an apache & php server ready to go in no time!

However I have hit a major problem: I already have a "standard" apache install (running as a windows service) on port 80. I want to add an xampp server for a completely separate project. Simple enough you would think - just use a different port number - which I have done and the xampp apache now is running perfectly well on port 81. The problem is that "xampp-control" only detects my other apache on port 80. This means I can't control the xampp apache using "xampp-control", and am also unable therefore to have it auto-start / run as service.

For a portable server this seems to me to be a significant fault, as it is common for developers to have multiple apaches. I have seen this issue discussed elsewhere so I cant be the only one!

Anyway, what I really wanted to ask is what the recommended solution/workaround is to this problem, or whether there is any progress in getting this bug fixed?
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista

Re: xampp & apache port

Postby Sharley » 29. November 2011 12:58

Not a problem, close that version of the control panel which is hard coded and run the new XCPv3 version found in the xampp folder:
xampp-control-3-beta.exe

Latest XCPv3 versions can be found here:
viewtopic.php?f=16&t=48932

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: xampp & apache port

Postby stevep » 02. December 2011 12:38

Thanks Sharley, the new control panel looks better & has more features.

However... the same problem is still there.

I have gone in to Config > Service and Port Settings, and set the Apache port to 81, to match the value set in the httpd.conf.

Sure enough, it saves an INI file containing:
Code: Select all
[ServicePorts]
Apache=81


BUT on the main screen it is still detecting my other (non-xampp) Apache on port 80. So unfortunately it is still not solving my problem. Any ideas?
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista

Re: xampp & apache port

Postby stevep » 02. December 2011 12:49

Just to add... I think the problem may be caused because my other Apache runs as a windows service. My guess is that xampp_control checks for *any* running Apache service, and if it finds one, uses that... even when that service is not related to xampp!

What should happen (I think) is that if a service is running, it should check to see if that service's apache instance is using the same port as defined in xampp_control's ".INI" file. If it is different, it should assume that apache is not related to the current xampp install, and should ignore it. Hope that makes sense.
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista

Re: xampp & apache port

Postby hackattack142 » 02. December 2011 14:25

It checks for the service name as specified in the Config > Service and Port Settings. The default name Apache uses is Apache2.2 (which is what I entered as a default value). If you change the Service Name there it should not detect your other Apache. You should also make sure they do not clash on port 443 (SSL).
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: xampp & apache port

Postby stevep » 02. December 2011 15:11

Have tried that, no joy. I renamed the XAMPP Apache to "XAMPPApache2.2", the INI file now contains:

Code: Select all
[ServiceNames]
Apache=XAMPPApache2.2
MySQL=XAMPPmysql
FileZilla=XAMPPFileZillaServer

[ServicePorts]
Apache=81
ApacheSSL=8443


However it unfortuntely still detects the "wrong" Apache on port 80.

What's odd though, is if I start the XAMPP apache first (via the apache_start.bat script) and THEN start the xampp control panel, surprisingly it then detects the correct apache on port 81. But if xampp control panel is started while xampp apache is down, it defaults to the "wrong" apache... and therefore the "right" apache cannot be started from the control panel!
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista

Re: xampp & apache port

Postby hackattack142 » 02. December 2011 23:21

You did try closing and reopening the control panel after making the change to the service name?

I am inspecting the code right now but I don't see anything that should cause the behavior you are experiencing yet.

edit: nevermind, i think i see what behavior you are talking about. I will try to find the cause and get a new version posted.

edit 2: Could you please try 3.0.9 viewtopic.php?f=16&t=48932&p=186862#p186862 and tell me if that fixes your issues.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: xampp & apache port

Postby stevep » 03. December 2011 19:12

hackattack, thanks for the update and the new version - kudos especially for such speed!

The new version (3.0.9.7) is better and is closer to the desired behaviour - but.... I still found a couple of problems...

This is what I did:
1. Set up config with correct service names & ports for the XAMPP apache etc.
2. restart xampp control panel
3a. Note my "other" apache (on port 80) is NOT detected - correctly!
3b. Note that apache "service" box is TICKED, even though xampp apache is not configured to run as service - I think this is still wrong.
4. Press apache "start" button. Apache starts on port 81, pid is detected - correctly!
5. Press apache "stop" button. Control panel thinks apache is stopped - but actually the apache is still running.
6. Press apache "start" buttton again. No effect - apache is still running but xampp control panel thinks it is still down.

So, in summary, I believe there are still two bugs....
1. the "service" checkbox should reflect whether the xampp apache is running as a service, not the "other" apache.
2. the apache "stop" button is not working correctly.

Oh, and actually, here is one other minor issue (sorry!):
Running the control panel again while it's already running creates a second instance - would be better if application is single instance only.

Hope that helps...
Steve
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista

Re: xampp & apache port

Postby hackattack142 » 03. December 2011 19:57

I posted 3.0.10 to fix the Apache stopping issue. I made a bad assumption on how the apache processes were listening for connections.

I am not having issues detecting the correct service (A grey check means not detected and a green check means detected)

This is what I am doing to test it.
1. Start the CP and install the Apache service via clicking the checkbox (making it turn into a green check).
2. Open the Config > Service and Port Settings
3. Change the name of the Apache Service (in this instance, I tried XAMPPApache2.2) and save
4. Restart the control panel
5. The check is in the grey check state again (service not detected)
6. Open and change the name back to the default (Apache2.2) and save
7. Restart the control Panel
8. The checkbox starts in the green check state (service installed) as expected

To me it looks like it is working correctly and the code looks correct as well. It detects solely based on the name defined in the INI file.

I considered single instance but at this time I have not implemented it. There are instances were people might have multiple XAMPPs installed and running concurrently. The INI configuration file allows for this to happen by only detecting the proper instances as defined (at least that is how it is suppose to work :) )
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: xampp & apache port

Postby stevep » 04. December 2011 18:29

Just tried version 3.0.10 - seems to be working perfectly - nice job!

I can confirm the apache stop issue is fixed for me.

The service feature is also working. This issue was down to me not understanding that a grey tick meant "not installed". Maybe this is a possible usability/interface issue, as I might not be the only one to assume "tick" = "installed". However it's no biggie - now that I understand the meanings, all seems be working correctly.

Thanks for your efforts!

Steve
stevep
 
Posts: 6
Joined: 29. November 2011 12:38
Operating System: Windows Vista


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 116 guests