0% found this document useful (0 votes)
2 views

php_installation_guide

This document provides a basic installation guide for PHP, outlining the requirements and steps for installation on Windows, macOS, and Linux. It includes instructions for downloading necessary software, setting up a web server, and testing the installation. Additionally, it suggests next steps for learning PHP syntax and building applications.

Uploaded by

toni92bg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

php_installation_guide

This document provides a basic installation guide for PHP, outlining the requirements and steps for installation on Windows, macOS, and Linux. It includes instructions for downloading necessary software, setting up a web server, and testing the installation. Additionally, it suggests next steps for learning PHP syntax and building applications.

Uploaded by

toni92bg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic PHP Installation Guide

Basic PHP Installation Guide for Beginners

1. What is PHP?

PHP (Hypertext Preprocessor) is a popular server-side scripting language used to develop dynamic

web pages.

2. Requirements:

- A web server (Apache recommended)

- PHP software

- A database server (MySQL recommended)

3. Installation on Windows:

- Download XAMPP from https://www.apachefriends.org/index.html

- Run the installer and follow the instructions

- Start Apache and MySQL from the XAMPP control panel

- Save your PHP files in the htdocs directory (e.g., C:\xampp\htdocs\myproject)

- Open your browser and go to http://localhost/myproject

4. Installation on macOS:

- Use MAMP or install PHP via Homebrew

- MAMP can be downloaded from https://www.mamp.info/

- Place your PHP files in /Applications/MAMP/htdocs/

- Start servers using the MAMP control panel


5. Installation on Linux:

- Use your package manager (e.g., apt, yum)

Example for Ubuntu:

sudo apt update

sudo apt install apache2 php libapache2-mod-php

- Save your PHP files in /var/www/html/

- Restart Apache: sudo systemctl restart apache2

6. Test PHP Installation:

- Create a file named info.php with the following content:

<?php phpinfo(); ?>

- Place it in your web server root and access it via browser

7. Next Steps:

- Learn PHP syntax: variables, loops, arrays, functions

- Connect PHP to MySQL database

- Build a simple CRUD (Create, Read, Update, Delete) application

You might also like