1

I was working on my web-application for a long time now, and someone suggested that I shouldn't be using XAMPP for connecting with my database, as this will only work with the local computer. So I have uninstalled XAMPP from my computer and downloaded PHP 7.4.8 under C:\php directory!

Suddenly the IIS Manager won't listen on localhost. I thought this might be my project so I have created a new project under C:\inetpub\wwwroot\website2 which has three files:

  • iisstart.htm
  • iisstart.png
  • web.config

Even though the other project is disabled, and the new one enabled. the browser returns the following error (I have tried both port:80 and port:8080 just to make sure that this is not the issue!):

This site can’t be reached
localhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

By this error I have few questions to ask!

  1. How to ensure that IIS Manager works okay?
  2. Even though I have deleted XAMPP the Apache Tomcat 8.0.27 is still installed on my computer. Should I delete that?
  3. How to make the default app work again?
Loizos Vasileiou
  • 674
  • 10
  • 37
  • I know its too late now but you should have tested the "new" environment on a different computer – GetSet Jul 13 '20 at 08:32
  • I'm afraid that is not possible! I do not have a second machine! – Loizos Vasileiou Jul 13 '20 at 08:33
  • Sure but you can use virtual machines for this kind of testing – ADyson Jul 13 '20 at 08:36
  • 1
    The worse thing to do is panic. Stop deleting stuff. Backup what you have. Reinstall xampp. (Be sure to backup your htdocs folder). Backup your htdocs first. It still should be on there. Uninstalling likely didnt touch it. – GetSet Jul 13 '20 at 08:36
  • 2
    P.S. _"someone suggested that I shouldn't be using XAMPP for connecting with my database, as this will only work with the local computer"_ ...and did you try to verify this suggestion? Because there's no reason you can't use XAMPP. It installs Apache, which is used to power many public websites. It does not restrict to you only using the local computer. It's not clear what was meant by that suggestion. It's a good idea not to simply take the word of a random individual without double-checking from reliable information sources. – ADyson Jul 13 '20 at 08:38
  • Maybe there might be a simpler solution than testing it on a second/virtual machine. This sounds like a long process! I have already backed it up (only the project file though) - should I do the whole htdocs? – Loizos Vasileiou Jul 13 '20 at 08:38
  • There is also a second reason for deleting XAMPP. I was unable to execute PHP files in my app as it got confused and downloaded them instead! – Loizos Vasileiou Jul 13 '20 at 08:40
  • 1
    _I was enable [sic, I assume "unable"] to execute PHP files in my app as it got confused and downloaded them instead_ ...this is a reason to fix the configuration of the product, not just completely destroy it without any kind of backup or planned procedure. – ADyson Jul 13 '20 at 08:41
  • If it downloaded the PHP files then there's a good chance on those occasions, the server wasn't even running in the background. A browser has no way on its own to know what PHP even is. In fact, a browser just doesn't know what PHP is ever. Your server does (XAMPP) – GetSet Jul 13 '20 at 08:43
  • Okay, so should I (1) reset IIS Manager, (2) download XAMPP, (3) add my backup htdocs in the inetpub dir?? – Loizos Vasileiou Jul 13 '20 at 08:43
  • Backup htdocs first if you care about your hard work – GetSet Jul 13 '20 at 08:45
  • I did! :S should I delete question? – Loizos Vasileiou Jul 13 '20 at 08:46
  • Why would you do that? – GetSet Jul 13 '20 at 08:47
  • "reset IIS Manager"...not sure what this even means. What specific task are you thinking of? You can try re-installing the whole IIS component through the windows setup, I guess. – ADyson Jul 13 '20 at 09:17
  • https://stackoverflow.com/a/13381109/7837264 – Loizos Vasileiou Jul 13 '20 at 09:18
  • 1
    Anyway if you really don't want XAMPP I see no reason to download it again. Instead you should focus on getting IIS working. It's unclear why removing XAMPP would have any effect on IIS at all, to be honest, unless you removed something else at the same time. On the other hand, as I mentioned above, I don't think removing XAMPP was ever actually necessary to begin with. So maybe re-installing it could be the simplest route back to having a working environment. – ADyson Jul 13 '20 at 09:19
  • Thanks for your replies all. I will try and do that. I will let you know if that worked! – Loizos Vasileiou Jul 13 '20 at 09:20
  • You can try to create a new website with a new port and test it to make sure the IIS is working well or not. then you could use netstat-ano to check which process has used 80 port. – samwu Jul 15 '20 at 07:14
  • Well, when a new project is created is set on the localhost, therefore it is not working! Note that the error comes from the browser and not IIS, so I don't know what causes the error. When I change the binding to an ip address, it works perfectly fine! – Loizos Vasileiou Jul 15 '20 at 07:20

0 Answers0