Installation Guide - AMVRS ARMED
Complete step-by-step guide to install and run AMVRS ARMED locally or on a server.
Table of Contents
System Requirements
Minimum Requirements
- PHP: 7.4 or higher
- MySQL: 5.7 or higher
- Web Server: Apache, Nginx, or IIS
- Browser: Chrome, Firefox, Safari, or Edge
- Storage: 50MB free space
Recommended
- PHP: 8.0+
- MySQL: 8.0+
- RAM: 2GB
- Bandwidth: 10 Mbps
Local Installation (XAMPP)
Step 1: Install XAMPP
- Download XAMPP from https://www.apachefriends.org/
- Install with default settings
- Start Control Panel
- Click “Start” for Apache and MySQL
Step 2: Clone Repository
cd C:\xampp\htdocs
git clone https://github.com/ajiko2505/Works.git
cd Works
Step 3: Create Database
- Open http://localhost/phpmyadmin
- Click “New” in left sidebar
- Enter Database name:
amvrss
- Click “Create”
Step 4: Import Database Schema
- Select
amvrss database
- Click “Import” tab
- Choose file:
database/amvrss.sql
- Click “Go”
- Open
database.php in text editor
- Verify settings match your installation:
```php
<?php
$serverName = “localhost”;
$username = “root”;
$password = “”; // Leave empty for XAMPP default
$dbname = “amvrss”;
$dbh = mysqli_connect($serverName, $username, $password, $dbname);
if(!$dbh) {
echo “Connection failed: “ . mysqli_connect_error();
exit;
}
?>
3. Save file
### Step 6: Access Application
1. Open browser
2. Navigate to: `http://localhost/Works`
3. You should see the home page
### Step 7: Create Admin User (Optional)
```sql
INSERT INTO users (username, password, email, role)
VALUES ('admin', MD5('admin123'), 'admin@amvrs.local', 'admin');
Server Installation
Step 1: Upload Files
- Connect via FTP/SFTP to your server
- Upload project files to public_html or www folder
- File structure should look like:
/public_html/
├── index.php
├── login.php
├── database.php
├── assets/
├── database/
└── ... (other files)
Step 2: Database Setup on Server
- Access cPanel → MySQL Databases
- Create new database:
amvrss
- Create MySQL user with full privileges
- Access phpMyAdmin
- Import
database/amvrss.sql
Step 3: Update Configuration
// database.php
$serverName = "localhost"; // Usually localhost
$username = "db_username"; // From cPanel
$password = "db_password"; // From cPanel
$dbname = "amvrss";
Step 4: Set File Permissions
chmod 755 .
chmod 644 *.php
chmod 755 assets/
chmod 755 database/
Step 5: Test Installation
- Visit:
https://yourdomain.com/Works
- Check if homepage loads
- Try login functionality
Database Setup
Default Tables
The SQL file creates:
users - User accounts and profiles
request - Vehicle requests
vehicles - Available vehicles
approvals - Request approvals
logs - System logs
Create Default Admin User
-- After importing amvrss.sql, add:
INSERT INTO users (username, password, email, user_type, status)
VALUES ('admin', MD5('admin123'), 'admin@amvrs.local', 'admin', 'active');
INSERT INTO users (username, password, email, user_type, status)
VALUES ('approver', MD5('approver123'), 'approver@amvrs.local', 'approver', 'active');
Verify Database
- Open phpMyAdmin
- Select
amvrss database
- Check all tables are present
- Verify no errors in import log
Configuration
Email Setup (PHPMailer)
For email notifications to work:
- Locate PHPMailer configuration in pages like
reqapp.php
- Update SMTP settings:
$mail->Host = 'smtp.gmail.com';
$mail->Port = 587;
$mail->Username = 'your-email@gmail.com';
$mail->Password = 'your-app-password';
Session Configuration
Sessions store in default PHP temp folder. For production, create:
mkdir sessions
chmod 700 sessions
Update PHP.ini:
session.save_path = "/path/to/sessions"
Verification
Home Page Test
- Navigate to application URL
- Should see vehicle listing
- “Login” and “Register” links visible
Database Connection Test
Create test.php:
<?php
include "database.php";
if($dbh) {
echo "Database connected successfully!";
} else {
echo "Connection failed";
}
?>
Visit /test.php and delete after testing.
Login Test
- Navigate to login page
- Default credentials:
- Username:
admin
- Password:
admin123
- Should login successfully
Troubleshooting
Common Issues
“Connection failed: Access denied”
- Check MySQL service is running
- Verify credentials in
database.php
- Reset MySQL password if necessary
- SQL import failed
- Re-import
database/amvrss.sql
- Check for errors in import log
“Page not found”
- Wrong URL format
- Files not in correct directory
- Check web server configuration
“Permission denied”
- File permissions too restrictive
- Run:
chmod 755 on all folders
- Web server user needs read access
Blank Page
- Check PHP error log
- Enable error reporting:
ini_set('display_errors', 1);
error_reporting(E_ALL);
- Look for database connection errors
Getting Help
- Check error logs in browser console (F12)
- Check server error logs
- Review database structure
- Open GitHub issue with error details
Post-Installation
Security Steps
- Change default passwords immediately
- Update SMTP credentials
- Set proper file permissions
- Enable HTTPS on production
- Remove test files
Optimization
- Enable PHP caching (OPcache)
- Optimize database indexes
- Enable gzip compression
- Implement rate limiting
Backup Strategy
# Backup database
mysqldump -u root -p amvrss > backup.sql
# Backup files
tar -czf amvrs-backup.tar.gz /path/to/application
Next Steps
Last Updated: February 6, 2026
Version: 1.0.0