The Right Environment
×
Home Courses Community Support
The Right Environment

Server Installation

Here we also need a server which can compile our PHP files and send to the browser, so that we can see the output. As you know that server is nothing more than a computer. Means, we can convert (actually make) our laptop into a web server. What we need, a system which can watch out for web request and according to the requests it can compile PHP and return the HTML.

Note: Here system means a software, just it. We don’t need internet because we are running our PHP file in our laptop only. Software can directly take the request and send the response.

Now we will use a server software named XAMPP, it stands for cross platform Apache, MySQL, PHP and Perl. Let’s see the procedure how we can make our pc a server through XAMPP.

Download Xampp from our download section or directly from the link. Follow installation process and start Xampp Control Panel.

Starting/Using XAMPP

The XAMPP Control Panel allows you to manually start and stop Apache and MySQL, or install them as services.

  1. To start Apache or MySQL manually, click the Start button under Actions next to that module. Depending on your security settings, Windows 7 users will probably have a small window open, asking if you want to allow xampp-control.exe to make modifications to your computer. Click “Yes” to allow Apache or MySQL to start. If you plan on using XAMPP frequently, you may want to consider installing Apache and MySQL as services on your computer. The advantage to this is that both modules will already be running once the XAMPP control panel opens.
     
  2. To install Apache and MySQL as services, click the red X to the left of each module under Services. You will see a small window open, asking you to confirm that you want to install it as a service. Click “Yes” to complete the installation. Repeat for the other module. Once again, you may have a security window open, asking if you want to allow the modifications to your computer. Click “Yes” to allow it. The red “X” will change to a green check mark once the service has been installed successfully. (After the initial setup is complete, you will need to run XAMPP as an administrator on Windows 7 when you start the program again. To do that, click Start, find XAMPP Control Panel in your Programs list, then right-click and select “Run as Administrator”.)
     
  3. The default XAMPP install is already pre-configured to run a local web server comparable to most web hosting servers. However, there are a couple basic configuration changes you can make to increase your productivity. The first change will be to set the default text editor. As you can see, XAMPP defaults to Notepad, the native Windows text editor. Click the folder button to the right to open the file explorer. Navigate to the folder for your favorite text editor, select the .exe file, and then click Open.
     

     
  4. The next change is to select your desired font for the logs that XAMPP creates. If you are trying to track down an issue, you will spend time reading different logs, so choose a font that is easy for you to read. Click on Log Options, then select your desired font and font size, then click Save.
     

    After making those changes, click Save in the main configuration window.
     
  5. If you find that you need to make a configuration change to Apache, PHP, or MySQL, click the config button for that module to bring up a context menu with links to the config files for that module. The file will open in the default text editor you chose earlier.
     
  6. Congrats, Xamp ready to use. Go to “http://localhost/” in your web browser. You will see the XAMPP splash screen first, asking you to select your language. Slelect your language and you will land to Xampp dashboard.
     

Xampp Securing

It is recommended that you secure your XAMPP install with a unique username and password for both the web panel and for phpMyAdmin. Click the Security link in the left sidebar. The XAMPP Security screen will appear. A table will show you the current security status for each component. To secure the XAMPP panel and phpMyAdmin, click the http://localhost/security/xamppsecurity.php link to open the Security Console.
 



The first section deals with the MySQL user. By default, the MySQL administrator (root) has no password in XAMPP. To secure MySQL, enter your desired password in the New Password field, then again in the Repeat the new password box. Choose your authentication method (http or cookie), then click Password Changing.The second section deals with securing the XAMPP web panel. Enter a unique username in the Username field, a strong password in the Password field, then click Make safe the XAMPP directory.

Navigate to the XAMPP Security section to check the security status of each component after completing these steps. The XAMPP directory, MySQL, and phpMyAdmin should now have a SECURE status next to them.

Shut down XAMPP

  • You can shut down XAMPP from the main control panel by clicking Stop next to each of the services that are running, and then click Quit.
  • Apart from above method, you can also shut down XAMPP from the systray icon. Right-click the XAMPP icon and a context menu will appear. Hover over the first service running, then click Stop. The green light will turn red once it has stopped. Repeat for the other services running, then click Quit to exit the program.

 

← Preview

About PHP

Next →

First PHP Program

NOTES

Our mission is to provide highly effective and quality education via innovative solutions. Geeksdemy look forward to bridge the gap between in-demand technology and academics in order to deliver innovative, easy, interesting and affordable learning across the Globe.

Courses

  • Python
  • Game Development with Unity 3D
  • Arduino
  • PCB & Circuit Designing
  • Robotics and Embedded C
  • 8051/8052 Embedded Systems
  • QuadCopter & UAV
  • MATLAB with Robotics
  • Raspberry Pi
Learn On the Go!
Get the Android App
Get the iOS App