1

Basically, I am coding a website (from raw code can't stand using wordpress) for primary school children and teachers. The function of the website is to teach both children and teachers scratch in simple easy steps. I am in secondary school now going to be in year 10 after summer, and I am thinking of showing this website to my old primary school so the children and teachers can both have a better understanding of scratch.

For this website, I wanted a page where the user can email me from the website so they can suggest improvments for the website or notify me about any bugs. For that, I know I need PHP, I'm fairly new to PHP I know the basics but I am not completely fluent in it. Since I needed PHP I did a little research and downloaded XAMPP for windows (10). I know some of the basics but not much as I only did this last night.

My problem: Whenever I type in /localhost/it just shows up as blank. I've read some places that it may because I messed up somewhere in my installation. Others are saying it is because of my browser (I am using firefox) everyone is being really confusing. I came here for a clear answer. Why is this happening and what can I do fix it?

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Coderess
  • 21
  • 1
  • 7
  • Try using `http://localhost`. I just tested `/localhost/` on mine and it worked fine. Make sure that php is indeed started. – Funk Forty Niner Aug 10 '17 at 23:54
  • Thanks. But it is still showing up as blank :/ – Coderess Aug 10 '17 at 23:56
  • Are all services running and with a green light? Did you also try restarting your PC after installing? That could do it also. You may also need to run as adminstrator rights. And make sure there's an index.php file in that folder. – Funk Forty Niner Aug 10 '17 at 23:56
  • How would I check if my services are running with a green light? And I didn't restart my PC I shutdown my PC, then turned it back on in the morning when I woke up. I've been looking for solutions pretty much all day, but I didn't really understand much. – Coderess Aug 11 '17 at 00:00
  • Oh and the PHP file is in that folder I know I should do that. Does it have to be index.php? And why do I need to run as adminstrator? I would just like to know so I don't repeat the same mistake in the future. – Coderess Aug 11 '17 at 00:03
  • You need to start the Xampp control panel and start Apache and PHP if you haven't done that yet. If you haven't, find the shortcut for it, run it and then try again. See also these Q&A's on Stack https://stackoverflow.com/q/27333203/ --- https://stackoverflow.com/q/30758894/ and another https://blog.imaginea.com/how-to-make-wampxampp-work-on-windows-10/ - Hope they'll shed a bit of light on all this. *"Does it have to be index.php?"* - I would recommend it, yes. – Funk Forty Niner Aug 11 '17 at 00:03
  • *"And why do I need to run as adminstrator?"* - Because it may be blocked by a Firewall or a port and it needs to have full rights. This, in a nutshell. – Funk Forty Niner Aug 11 '17 at 00:05
  • Oh I didn't know that you see. I thought you could do localhost with the control panel closed. – Coderess Aug 11 '17 at 00:06
  • @Fred-ii- Also, if you think my question is well written and provides detail please could you give it one point? – Coderess Aug 11 '17 at 00:09
  • I take it that what I said in one of my last comments helped you solve this, correct? If so, let me write up an answer where you can mark it as solved in order to close the question properly. – Funk Forty Niner Aug 11 '17 at 00:13

1 Answers1

0

As discussed in comments; you need to open the Xampp control panel and start the related services such as Apache, as shown in the screenshot.

You may also need to run as administrator rights. Windows 10 does have certain issues about this.

enter image description here

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141