🔍 System Checker v3.3.0

Testing all components, endpoints, and permissions...

1. Database Tests

✅ PASS: Database Connection - Connected successfully
✅ PASS: Table: users - Exists and accessible
✅ PASS: Table: locations - Exists and accessible
✅ PASS: Table: assessments - Exists and accessible
✅ PASS: Table: risk_categories - Exists and accessible
✅ PASS: Table: risk_items - Exists and accessible
✅ PASS: Table: assessment_risks - Exists and accessible
✅ PASS: Table: action_items - Exists and accessible
✅ PASS: Table: permissions - Exists and accessible
✅ PASS: Table: audit_log - Exists and accessible
✅ PASS: Table: assessment_versions - Exists and accessible
✅ PASS: Table: user_activity - Exists and accessible
✅ PASS: Table: hazard_library_photos - Exists and accessible

2. File Structure Tests

✅ PASS: File: Configuration - Found at config/config.php
✅ PASS: File: Database class - Found at includes/Database.php
✅ PASS: File: Authentication class - Found at includes/Auth.php
✅ PASS: File: Helper functions - Found at includes/functions.php
✅ PASS: File: Audit Manager - Found at includes/AuditManager.php
✅ PASS: File: Version Control - Found at includes/VersionControl.php
✅ PASS: File: Hazard Library - Found at includes/HazardLibrary.php
✅ PASS: File: Entry point - Found at public/index.php
✅ PASS: File: Login page - Found at public/login.php
✅ PASS: File: Dashboard - Found at public/dashboard.php
✅ PASS: File: Main stylesheet - Found at public/assets/css/style.css
✅ PASS: File: Main JavaScript - Found at public/assets/js/main.js

3. Public Page Tests

✅ PASS: Page: index.php - Syntax OK
✅ PASS: Page: login.php - Syntax OK
✅ PASS: Page: dashboard.php - Syntax OK
✅ PASS: Page: assessments.php - Syntax OK
✅ PASS: Page: assessment-create.php - Syntax OK
✅ PASS: Page: assessment-view.php - Syntax OK
✅ PASS: Page: assessment-edit.php - Syntax OK
✅ PASS: Page: locations.php - Syntax OK
✅ PASS: Page: location-create.php - Syntax OK
✅ PASS: Page: location-edit.php - Syntax OK
✅ PASS: Page: location-view.php - Syntax OK
✅ PASS: Page: hazard-library.php - Syntax OK
✅ PASS: Page: hazard-create.php - Syntax OK
✅ PASS: Page: hazard-view.php - Syntax OK
✅ PASS: Page: hazard-edit.php - Syntax OK
✅ PASS: Page: users.php - Syntax OK
✅ PASS: Page: user-create.php - Syntax OK
✅ PASS: Page: user-edit.php - Syntax OK
✅ PASS: Page: settings.php - Syntax OK
✅ PASS: Page: themes.php - Syntax OK
✅ PASS: Page: permissions.php - Syntax OK
✅ PASS: Page: pdf-templates.php - Syntax OK
✅ PASS: Page: audit-logs.php - Syntax OK
✅ PASS: Page: assessment-versions.php - Syntax OK
✅ PASS: Page: version-compare.php - Syntax OK
✅ PASS: Page: user-activity.php - Syntax OK
✅ PASS: Page: logout.php - Syntax OK

4. API Endpoint Tests

⚠️ WARN: API: upload-hazard-photo.php - Exists (no runtime test)
⚠️ WARN: API: delete-hazard-photo.php - Exists (no runtime test)
⚠️ WARN: API: add-hazard-to-assessment.php - Exists (no runtime test)
⚠️ WARN: API: search-hazards.php - Exists (no runtime test)
⚠️ WARN: API: delete-hazard.php - Exists (no runtime test)
⚠️ WARN: API: auto-audit.php - Exists (no runtime test)

5. Permission Tests

✅ PASS: Permissions Table - 24 permission rules found
✅ PASS: Role: admin - 8 permissions
✅ PASS: Role: assessor - 8 permissions
✅ PASS: Role: viewer - 8 permissions

6. User Tests

✅ PASS: Default Admin User - Exists
✅ PASS: User Count - 1 users in system

7. Location Enhancement Tests

✅ PASS: Location column: opening_hours - Exists
✅ PASS: Location column: delivery_windows - Exists
✅ PASS: Location column: contact_name - Exists
✅ PASS: Location column: contact_phone - Exists
✅ PASS: Location column: parking_info - Exists

8. Data Validation Tests

⚠️ WARN: Assessments - 2 assessments
⚠️ WARN: Locations - 29 locations
✅ PASS: Hazard Templates - 16 templates

9. Audit System Tests

⚠️ WARN: Audit Logs - 2 entries
⚠️ WARN: Assessment Versions - 0 versions

10. File Permission Tests

✅ PASS: Directory writable: public/uploads/assessments - OK
✅ PASS: Directory writable: public/uploads/hazard-library - OK
✅ PASS: Directory writable: logs - OK

11. Configuration Tests

✅ PASS: DB_HOST defined - localhost
✅ PASS: DB_NAME defined - scubatricky_risk
✅ PASS: BASE_URL defined - https://scubatricky.com/risk
✅ PASS: SITE_URL defined - https://scubatricky.com/risk/public/

📊 Test Summary

Total Tests: 81
✅ Passed: 71
⚠️ Warnings: 10
❌ Failed: 0
Pass Rate: 87.7%

✅ All critical tests passed!

⚠️ 10 warning(s) - check configuration


System Checker v3.3.0 | 2026-03-23 21:00:13