+ 3

What do i need to compile and run php?

Sololearn says i need to download a web server but i don't know what a web server is, why i need it and how it works neither (at first look seems complicated). Help please.

26th Jan 2017, 7:24 PM
infinity
infinity - avatar
9 odpowiedzi
+ 7
Of you have a Windows Computer and like total test your PHP Scripts, ist XAMPP
26th Jan 2017, 7:38 PM
Mario L.
Mario L. - avatar
+ 6
because the browser translates it.
26th Jan 2017, 7:44 PM
Mario L.
Mario L. - avatar
+ 6
A server is a machine with a server operating system like Linux or Windows and - in case of a webserver - the software Apache or NGINX. the browser is a software on your computer or smartphone, e.g. internet explorer, chrome or Firefox. you need a browser to display webpages. the server holds those pages and serves them to you.
26th Jan 2017, 8:04 PM
Mario L.
Mario L. - avatar
+ 5
a webserver is hosting the files and Web apps of your server. You need it because php runs on a server not a client. Apache supports php
26th Jan 2017, 7:30 PM
Daniel S
Daniel S - avatar
+ 4
html does not need a server because it can also run in the file protocol, which loads the file directly from the hard drive and renders it in the Webbrowser, there is no step with a server involved
26th Jan 2017, 7:45 PM
Daniel S
Daniel S - avatar
+ 4
Final question: difference between server and browser? btw thank you your help was really precious
26th Jan 2017, 8:00 PM
infinity
infinity - avatar
+ 4
The browser basicly displays what it gets for example: it gets the html file provided by a server and displays all of it The server as said before provides the data to the browser. The server also manages things like php or mysql. you might ask, and why do I need a server? why don't I just load it directly from the hard drive. well, that's a good question it's because it handles the loading over the Internet to your browser. The file protocol skips the server step and loads it directly from your hard drive because html files don't need to run php code on the server and the data does not need to be transfered through the internet
26th Jan 2017, 8:07 PM
Daniel S
Daniel S - avatar
+ 3
and why HTML does not need a server?
26th Jan 2017, 7:41 PM
infinity
infinity - avatar
+ 3
CodeAnywhere.com is an 'easy' way to fire up a PHP box and get a feeling for setting up your own. And you can safely break it.
27th Jan 2017, 8:44 PM
Kirk Schafer
Kirk Schafer - avatar