PHP Introduction | Server Setup | Start the XAMPP Server

When starting PHP, where should you begin? The first step is to prepare a “web server environment.” Web programming means creating programs that run on websites. The web runs through web servers. Creating programs that run on this web server, generally called “server-side programs,” can be considered web programming. PHP also runs on a web server. In the end, you must first prepare “a web server program and PHP programs that run on it.”

The best choice here is to use “XAMPP.” XAMPP is a packaged program that bundles a web server environment. It includes not only a web server program, but also programming languages such as Perl and PHP that run on it, the MySQL database, a mail server, an FTP server, and other servers and languages used in web programs. When you install XAMPP, all of these are installed at once in a ready-to-use state.

https://www.apachefriends.org

First, access this address. This is the XAMPP web page. From there, download and install XAMPP for the platform you use. On Windows, click the “XAMPP for Windows” link and download the “EXE” file (a self-extracting RAR archive) for the “XAMPP Windows version” from the page that appears.

Double-click the downloaded EXE file to run it, then press the “install” button to start installation. By default, it creates a folder named “xampp” directly under the C drive and installs there. A command prompt window may suddenly appear during installation, but you can continue by pressing Enter. At the end, when “Please Choose ……” appears and a numbered selection list from 1 to 7 is displayed, installation is complete. Close the window and confirm that “XAMPP for Windows” has been added to All Programs in the Start menu.

Start the XAMPP Server

After installation, start the XAMPP web server. XAMPP includes several server programs, all of which can be centrally managed from an application called the “XAMPP Control Panel.”

In the “XAMPP for Windows” group provided in the Start menu, this is called “XAMPP Control Panel.” When you select this menu, a small window appears on the screen. This is the XAMPP Control Panel. It displays several items under “Modules.” The displayed items are as follows.

  • Apache: This is the web server.
  • MySql: This is the database server.
  • FileZilla: This is the FTP server.
  • Mercury: This is the mail server.
  • Tomcat: This is the Java server.

If you are only studying PHP for now, you only need to run “Apache.” Press the “Start” button on the right to start the Apache HTTP Server. Your PC is now a web server. It is very simple.

After starting the web server, open a web browser and access the server. Enter the following address.

http://localhost/

The XAMPP for Windows screen will now appear. Since language links are shown at the bottom, select “Korean.” The screen changes to one labeled “XAMPP for Windows.” On this screen, detailed items are displayed on the left. These are various tools provided by default with XAMPP. By clicking links here, you can view information and settings for the other servers.

First, confirm that this screen is displayed without problems. If it appears, preparation for using PHP is complete. If you ask, “Do I not need to prepare anything to use the PHP programming language on the web server?” the answer is that you do not. Once the web server starts, PHP should already be ready to use.