Port 80

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

Port 80

Postby klenium » 07. July 2015 10:47

You know this error:
11:08:30 [Apache] Problem detected!
11:08:30 [Apache] Port 80 in use by ...
11:08:30 [Apache] Apache WILL NOT start without the configured ports free!
11:08:30 [Apache] You need to uninstall/disable/reconfigure the blocking application
11:08:30 [Apache] or reconfigure Apache and the Control Panel to listen on a different port

80 is used by another program, and I don't want to change it, however I changed the apache's port to XXXX, and now I'm using http://localhost:XXXX/. Wouldn't it be better if xampp could read the httpd.conf and detect which ports apache is running on? I know that I can change which ports xampp cp should listen, but why would I do it twice?
klenium
 
Posts: 2
Joined: 07. July 2015 10:29
Operating System: Windows 7

Re: Port 80

Postby Nobbie » 07. July 2015 14:06

klenium wrote:Wouldn't it be better if xampp could read the httpd.conf and detect which ports apache is running on? I know that I can change which ports xampp cp should listen, but why would I do it twice?


You get this wrong, of course Apache reads httpd.conf on which port(s) to listen. The specification of the port in the URL is for your browser (and not for Apache/Xampp), if you do not specify a port, the browser will use port 80 (according to http default).
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Port 80

Postby klenium » 07. July 2015 18:52

Nobbie wrote:You get this wrong, of course Apache reads httpd.conf on which port(s) to listen. The specification of the port in the URL is for your browser (and not for Apache/Xampp), if you do not specify a port, the browser will use port 80 (according to http default).

What? I can't understand what you're trying to explain or how it affects my question.

What I mean is why xampp needs to store the port in xampp cp > config > service and port settings (>stored) instead of reading it directly from the httpd.conf (>used)? If I change the stored port to 7763, when the used port remains 80, xampp will check an unused port - why would it. If I change used port, xampp will check a port that it shoudln't since apache's running on a different port - why would it. So I have to change both if I don't want to see useless warnings, but again, why would I do that if xampp can read the port from httpd.conf? As you can read the info from the service settings' window, the sotred port isn't used for anything else than checking it on startup. I just wonder why is it needed, I can't understand.
klenium
 
Posts: 2
Joined: 07. July 2015 10:29
Operating System: Windows 7

Re: Port 80

Postby Altrea » 07. July 2015 19:11

klenium wrote:What I mean is why xampp needs to store the port in xampp cp > config > service and port settings (>stored) instead of reading it directly from the httpd.conf (>used)?

The way Apache stores settings is very flexible. You can Include external files and split it up into multiple files, you can wrap settings in dependencies and other conditions, etc. It is not an easy task to add the functionality to read out the ports (or any other single setting) from the Apache configs. The programmer of the control panel would need to code a full Apache config parser, which would take hours or days to get this bullet proof, all this just for saving you a minute of time you only need to do once if ever?
I already asked the programmer for this functionality and he will not do this. If you are capable to code this feel free to add this functionality. The CP is an open source piece of software written in delphi by a community member of this board.
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: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Port 80

Postby Nobbie » 07. July 2015 21:49

klenium wrote:What I mean is why xampp needs to store the port in xampp cp > config > service and port settings (>stored) instead of reading it directly from the httpd.conf (>used)?


Unfortunenately you did not ask that and did not say anything about Xampp CP Config. Instead you explicitely mentioned the port in the URL. Therefore i answered, what you asked, i cannot know that you did not mean the URL but the Xampp Config. Anyway, you dont need to change Xampp CP Config for Apache, this is only for ControlPanel and does not affect Apache. Apache can start without Control Panel.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Port 80

Postby glitzi85 » 07. July 2015 21:52

@Nobbie:
klenium wrote:Wouldn't it be better if xampp could read the httpd.conf and detect which ports apache is running on? I know that I can change which ports xampp cp should listen, but why would I do it twice?
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: Port 80

Postby Nobbie » 07. July 2015 22:36

And?

"Wouldn't it be better if xampp could read the httpd.conf "

There is (still) no software "xampp". Xampp is a collection. Most people mix "xampp" and "apache" and finally even "Xampp CP" does NOT listen to any Port. The description is poor. The second was way shorter AND by far better.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests