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
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.
In my case problem with xdebug in some case solution update xdebugg file from xdebug site https://xdebug.org/download.php if it not work please comment xdebug code in php.ini
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 :)
I was also facing the same issue in my local PC.
I was trying with URL
127.0.0.1/project-name
Then i tried with URL
http://localhost/project-name
and it worked. I don't know how but it worked.
Have you got skype? Because automatically skype uses port:80 and or 443.
Try to change it.
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.