Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XAMPP Ports Change On its Own

Tags:

port

apache

xampp

My Apache Ports are set to:
80 and 443

Looking at the XAMPP control panel a few hours later, I noticed the Ports had changed to:
05 and 59895

  1. Would XAMPP switch to these Ports automatically for some reason after several hours?
  2. Is there a danger in using/opening these Ports?
like image 782
vbenitogo Avatar asked Sep 05 '25 04:09

vbenitogo


2 Answers

Same problem was answered in this post by one of XAMPP developers. Assuming this is real (quote):

In short, that is normal. Apache listens for and accepts requests on ports 80 and 443 but it does not service requests on those ports. When you or others connect to your servers, they will be handled by other connections usually using high ports. The control panel just looks for all ports associated with a module. It is just picking up those client ports and the box to show all the ports is just not big enough to show them all.

like image 53
Shahar Avatar answered Sep 07 '25 22:09

Shahar


This is the full scenario i am explaining here that will clear you out :

We get a php page not responding, the first thing comes to our mind is : Is the apache service running on xampp ?

we immediately go to the xampp to check, and what we see is , the port is not 80 !!! Definitely every one will deduce the result that its port issue (same case happened to me) .

While its not the port issue. infact xampp changes the ports for it self. while requests are recieved on 80 as normal.

The real issue at that time is : that our code is not connecting to Database.

Hence . please keep in mind, there is no issue in that. Your apache is fine. Just go and check your db connection !! and cheers :)

like image 28
captain_a Avatar answered Sep 07 '25 22:09

captain_a