Page 1 of 1

Cant access XAMPP using other devices in LAN if DHCP used

PostPosted: 17. October 2023 11:52
by michimayo
Hello! Here's my situation.

I have a PC (acts as a server) and a mobile that is connected through a router (without internet). I can't connect to my PC using my mobile by typing in the IP address of the PC to the browser. It just keeps on loading. However, if I try to assign the IP address of my mobile manually, I can connect to it.

Also, when using my PC, I can access my PHP files quickly if I use localhost/(insert PHP files here). But when I type in my own IP address instead of localhost, it still loads but it is slow. I can fix this by also assigning the IP address of the PC manually.

In summary, if I used static IP addresses on both of my devices, there are no issues. But If I used DHCP or dynamically assigned IP address to them, the mobile wouldn't connect to the server, and the PC would load its own files slowly.

P.S. Both of the devices can see each other. Pinging my mobile whether it has a static IP address or dynamic IP address produces the same result.