MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

How to setup PHP in localhost for server-side scripting?

In this blog I am going to start with the beginning, So even if you are not aware to run PHP on your local machine you to it just following this blog, let me introduce the first XAMPP.

What is XAMPP?

XAMPP start for Cross-Platform, PHP, Mysql, Perl, Apache. XAMPP is a very lightweight and simple Apache distribution, So you can use it because this is available any platform and easily as Windows, Linux, or Mac.

XAMPP has four main components.:

  1. Apache
  2. MySql
  3. PHP
  4. Perl
  1. Apache is a web server process that converts PHP files into simple HTML and sends it to the web browser of a user. Apache is the most usable and famous server today, with more than 50% website using it.

2. MySQL
MySQL means database almost all websites that are dynamic needs to store data for that pupose we uses a database. MySQL is most famous database management system and an open source.

  1. PHP
    PHP is a server-side scripting language that is used by world 70% websites as Facebook is also an example.
    PHP: Hypertext Preprocessor(Recursive Acronym)
    Server-Side Programming/Scripting Language
    Can be embedded directly within HTML ()
    Files use a “.php” file extension.

How to install XAMPP?

This is the first step for setup local hosts for server-side scripting. First go to google and type XAMPP download and click the first link and download XAMPP and install. This is free and easily install.

https://www.apachefriends.org/index.html

Apache Friends XAMPP download page with Windows, Linux and OS X download options highlighted

After that install you can look like as below image then you go to click start button of Apache and MySql for start XAMPP server

XAMPP Control Panel with Start buttons for Apache and MySQL highlighted

and go your browser and open new tab and type :- localhost/phpmyadmin
1st go to new and click and type database name in input box and click create button.

PhpMyAdmin Databases page showing the steps to click New, enter a database name and click Create

After that go c drive XAMPP folder of htdocs and create a new folder and create a new file as .php extention file and run into your browser.

File Explorer showing start.php inside C:\xampp\htdocs\ajay-file-06-2020 folder
Browser at localhost/ajay-file/start.php showing output: This is PHP setup local host for server side scripting

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Icinga Install and Configuration

This guide shows how to set up Icinga 2 with a MariaDB backend on Ubuntu. It covers preparing MariaDB, resetting a lost root password on a system…

Read More

How to Reset or Recover Forgotten mySql root Password

To reset a forgotten MySQL or MariaDB root password, stop the server, restart it with grant checks turned off (skip-grant-tables), set a new password with ALTER USER,…

Read More

Complete Guide for Socket based vs TCP Based Application Connection

Here’s a clear, end-to-end tutorial you can keep handy. It explains what “socket-based” vs “TCP-based” really means, how to tell which one you’re using, and how to…

Read More

keycloak: Installing keycloak with mysql (socket + TCP enabled)

To run Keycloak 17+ (Quarkus) with MySQL on the same server (XAMPP/LAMPP). It covers two supported setups. Pick A (TCP) for a production-style config, or B (UNIX…

Read More

XAMPP – LAMPP Tutorials: List of Production Files to Cleanup Guide

Here’s a comprehensive and updated tutorial on which files should be cleaned up regularly in a production environment running XAMPP (under /opt/lampp), what each file/folder is, and…

Read More

Managing MariaDB Root Password and Connection Behavior in XAMPP (Ubuntu)

☁️ Introduction When working with MariaDB/MySQL inside XAMPP on Ubuntu, many developers face confusing issues related to root password behavior, localhost vs 127.0.0.1 access, and authentication plugins.This…

Read More