Page 1 of 1

Port 80

PostPosted: 07. July 2015 10:47
by klenium
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?

Re: Port 80

PostPosted: 07. July 2015 14:06
by 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?


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).

Re: Port 80

PostPosted: 07. July 2015 18:52
by klenium
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.

Re: Port 80

PostPosted: 07. July 2015 19:11
by Altrea
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.

Re: Port 80

PostPosted: 07. July 2015 21:49
by Nobbie
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.

Re: Port 80

PostPosted: 07. July 2015 21:52
by glitzi85
@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?

Re: Port 80

PostPosted: 07. July 2015 22:36
by Nobbie
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.