Servers


Development Server Role in PHP:

In this PHP Tutorial, we will cover Installing Web Server which is required to serve as development local server to test and debug PHP codes.

First, lets look into subject of Why we need a development server, what is a development server and what are options. As we mentioned earlier, PHP is a server-side scripting language. When a PHP web application is compiled, it is hosted in a Web server that can run that compiled script, to generate HTML page or related web content from script into the page to send to the client (to browser that requested a page). To be more specific, a PHP page in a web server works as “run-time”. Similar to a application that runs in windows. Windows is some sort of server that applications work in “run-time” when we open them or they work as service or similar way of entities.

Therefore, we need a web server to test PHP code that we developed. In PHP area, mostly Apache Web server is preferred, due to being a free web server. Since PHP, Apache Web Server and MySQL is a combo open-source free applications, they are preferred.

If we do not install a web server, we have to upload compiled PHP code to a server which is hosted in a remote location (to a hosted server), and that makes development harder. When you change a code, and compile the PHP page, it will be required to upload it again into the hosted server. To not encounter such issues, we will install a web server to local, to serve as a development server.

Lets check the Web server combos, the options. In programming sector, there is 3 main combo for a PHP web application, As acronyms:

– WAMP (Windows, Apache Server, MySQL, PHP)
– XAMPP (Mac, Apache Server, MySQL, PHP)
– LAMP (Linux, Apache Server, MySQL, PHP)

 

Leave a comment