This document provides a 5-step guide to install PHP using XAMPP on Windows: 1) Download and install XAMPP, 2) Start the XAMPP control panel and start the Apache and MySQL services, 3) Access PHPMyAdmin to manage databases, 4) Install a code editor like VS Code, and 5) Create a test PHP project to confirm the setup is working.
This document provides a 5-step guide to install PHP using XAMPP on Windows: 1) Download and install XAMPP, 2) Start the XAMPP control panel and start the Apache and MySQL services, 3) Access PHPMyAdmin to manage databases, 4) Install a code editor like VS Code, and 5) Create a test PHP project to confirm the setup is working.
1. Go to the official XAMPP website: https://www.apachefriends.org/index.html 2. Download XAMPP e.g. for Windows (Version PHP 8.2 or higher)
Step 2: Install XAMPP
1. Run the installer that you downloaded. 2. Follow the on-screen instructions to install XAMPP. Step 3: Start XAMPP Control Panel 1. Once the installation is complete, launch XAMPP Control Panel. a. On Windows, you can find it in the Start menu or desktop shortcut. b. On macOS, you can find it in the Applications folder. c. On Linux, you can start it from the terminal using sudo /opt/lampp/manager-linux- x64.run (adjust the path based on your installation). 2. Start the Apache and MySQL services by clicking the "Start" button next to each. 3. Open your web browser and go to http://localhost or http://127.0.0.1:80 . You should see the XAMPP dashboard, indicating a successful installation. If your Apache Server is unable to open at Port 80, 1. Go to “Config” > “Apache (httpd.conf)” or go to “C:\xampp\apache\conf\httpd.conf”
2. Then change all occurrences of 80 to some port else (e.g. 81).
3. Save the file and restart the “Apache” server on XAMPP control panel. Now go to http://localhost:81 or http://127.0.0.1:81 (localhost:[changed port no.]).
Step 4: Run MySQL in PHPMyAdmin
1. Make sure your “MySQL” server is running in XAMPP Control Panel. 2. Now, go to http://localhost/phpmyadmin/
Step 5: Install a Code Editor
1. Download: Visit the official VS Code website: https://code.visualstudio.com/ 2. Run Installer: Once the download is complete, run the installer executable. 3. Run Installer: Once the download is complete, run the installer executable. Step 6: Run a Test Project 1. Create a new folder in “C:\xampp\htdocs” e.g. lab_1
2. Open this folder in VS Code and create another file in this folder, index.php. 3. Go to http://localhost/lab_1 in your browser.