XAMPP Ports Change On its Own

烂漫一生 提交于 2019-11-28 22:58:43

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.

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

Have you got skype? Because automatically skype uses port:80 and or 443.

Try to change it.

you might be checking the current daemon/process ids through XAMPP control panel ..xampp does not changes port numbers on it's own.. restart your system or restart apache and you will find these numbers again changed to some other numbers..

i hope this resolves both of your queries..

Please make sure that you have given right port number after your host if your My SQL required port, Generally we don't required Port in Host value.

I just made this mistake and found it.

Well, I had this problem so I got here.

I understand that this is not a problema with xampp so I started to check my code.

I was working with this code last friday.

$conn = new mysqli($host, $user, $pass, $database);

Today the code wasn't working so I have updated to this:

$conn = new mysqli($host."8000", $user, $pass, $database); //8000 is the apache port, you can change it to 80

It work's fine for me!

Hope this help you guys

I experienced this behaviour when using XDebug.
Everything in XAMPP was very slow, phpmyadmin or any website. Ports were changing almost on every request.
Commenting [XDebug] block on php.ini was my solution.

If you have Xdebug installed there might be problem as XAMPP and Xdebug have some up-and-down scenarios. Check whether Xdebug is listening to PHP. if yes disable or deactivate that listening till you finalize with the database.

Ramon Brülisauer

I've came across the same issue.

In my case I found a "strange" proxy config in httpd.conf.

As soon as I commented out the following lines, the issue disappeared:

<IfModule mod_proxy.c>
<IfModule mod_proxy_ajp.c>
Include "conf/extra/httpd-ajp.conf"
</IfModule>
</IfModule>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!