Skip to main content

Installation

This guide walks you through setting up the School Management Platform on your local development environment using XAMPP.
Installation typically takes 10-15 minutes. Make sure you have at least 500MB of free disk space.

Prerequisites

Before you begin, ensure you have:
  • Windows, macOS, or Linux operating system
  • At least 500MB of free disk space
  • Administrator/root access to install XAMPP
  • Git installed (optional, for cloning the repository)

Installation steps

1

Download and install XAMPP

Download XAMPP from the official website. Choose the version that includes PHP 7.4 or higher.Install XAMPP to your preferred location:
  • Windows: C:\xampp
  • macOS/Linux: /opt/lampp or ~/xampp
During installation, ensure both Apache and MySQL components are selected.
2

Clone the repository

Open your terminal or command prompt and navigate to the XAMPP htdocs folder:
cd C:\xampp\htdocs  # Windows
cd /opt/lampp/htdocs  # Linux
cd ~/xampp/htdocs  # macOS
Clone the School Management Platform repository:
git clone https://github.com/unesexact/School-Management-Platform.git
Alternatively, download the ZIP file from GitHub and extract it to the htdocs folder.
The folder must be named school_management or you’ll need to update the path references throughout the application.
3

Start XAMPP services

Launch the XAMPP Control Panel and start both services:
  1. Click Start next to Apache
  2. Click Start next to MySQL
Both should show green “Running” status.
If Apache fails to start, port 80 might be in use. Check if IIS or Skype is running and stop those services.
4

Create the database

Open phpMyAdmin in your browser:
http://localhost/phpmyadmin
Create a new database:
  1. Click New in the left sidebar
  2. Enter database name: school_db
  3. Choose collation: utf8mb4_general_ci
  4. Click Create
If you prefer a different database name, you’ll need to update the configuration in the next step.
5

Import database schema (if provided)

If a SQL file is included in the repository:
  1. Select your school_db database in phpMyAdmin
  2. Click the Import tab
  3. Click Choose File and select the .sql file from the project
  4. Click Go to import
If no SQL file is provided, you’ll need to create the database tables manually or contact the project maintainer for the schema.
6

Configure database connection

Create the database configuration file. In your project, create the folder and file:
cd school_management
mkdir config
Create config/database.php with the following content:
<?php

class Database
{
    private static $instance = null;
    private $connection;

    private $host = 'localhost';
    private $db_name = 'school_db';
    private $username = 'root';
    private $password = ''; // Default XAMPP has no password

    private function __construct()
    {
        try {
            $this->connection = new PDO(
                "mysql:host=" . $this->host . ";dbname=" . $this->db_name,
                $this->username,
                $this->password
            );
            $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->connection->exec("set names utf8mb4");
        } catch (PDOException $exception) {
            echo "Connection error: " . $exception->getMessage();
            die();
        }
    }

    public static function getInstance()
    {
        if (!self::$instance) {
            self::$instance = new Database();
        }
        return self::$instance;
    }

    public function getConnection()
    {
        return $this->connection;
    }
}
This file is gitignored by default to protect your database credentials. Update the values if you’ve changed your MySQL username, password, or database name.
7

Verify installation

Open your browser and navigate to:
http://localhost/school_management/public
You should see the login page with “School Management Login” header.
If you see a “Page not found” or blank page, check that:
  • Apache is running
  • The folder is in the correct htdocs location
  • The public folder contains index.php

Verify your setup

To confirm everything is working correctly:
  1. Check Apache: Visit http://localhost - you should see the XAMPP dashboard
  2. Check MySQL: Open phpMyAdmin at http://localhost/phpmyadmin
  3. Check application: Visit http://localhost/school_management/public for the login page

Troubleshooting

Apache won’t start

Problem: Port 80 is already in use Solution:
  • Stop IIS if running on Windows
  • Close Skype or change its port settings
  • Edit XAMPP’s Apache config to use port 8080 instead

Database connection error

Problem: “Connection error” message appears Solution:
  • Verify MySQL is running in XAMPP Control Panel
  • Check database credentials in config/database.php
  • Ensure database school_db exists in phpMyAdmin

Page not found errors

Problem: Routes return 404 errors Solution:
  • Check that .htaccess file exists in the public folder
  • Enable mod_rewrite in Apache configuration
  • Verify the correct path is used: /school_management/public

Session errors

Problem: Login doesn’t work or session errors appear Solution:
  • Ensure PHP session directory is writable
  • Check that session_start() is called in public/index.php
  • Clear browser cookies and try again

Next steps

Now that you’ve installed the platform, proceed to the quickstart guide to:
  • Create your first admin user
  • Log in and explore the dashboard
  • Add students and teachers
  • Create your first course
Remember to secure your installation before deploying to production. This includes setting strong database passwords, enabling HTTPS, and configuring proper file permissions.

Build docs developers (and LLMs) love