Connecting mosques and communities
📖 Help Center & User Manual · Documentation Version 1.0

Kariahku.com User Manual & Help Center

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

SEC-08B ✓ Fully Implemented

Automatic Prayer Time Sync, JAKIM e-Solat Source & Troubleshooting (/admin/prayer-times)

Technical and operational guide to automatic prayer time synchronization, the /admin/prayer-times administration console, CLI prayer-sync command, and troubleshooting missing times or API failures.

Fully Implemented: This module is fully implemented and active in the current Kariahku.com system.
Purpose of Function Help Platform and Mosque Administrators keep prayer schedules up to date and diagnose synchronization or network errors.
Prerequisites Global `mosques.manage` permission for `/admin/prayer-times` or server CLI access for `php database/manage.php prayer-sync`.
Required User Permissions Global Scope: mosques.manage (/admin/prayer-times) or CLI prayer-sync
System Route /admin/prayer-times

Step-by-Step Instructions

1. Official Prayer Time Source (JAKIM e-Solat)

Kariahku.com retrieves prayer times exclusively from the official JAKIM e-Solat endpoint:

  • Endpoint: https://www.e-solat.gov.my/index.php?r=esolatApi/takwimsolat&period={today|month}&zone={CODE}
  • Security & Validation: Enforces TLS certificate verification (`CURLOPT_SSL_VERIFYPEER = true`), a 12-second timeout, and strict `HH:MM` timestamp validation for all 7 prayer times before writing to `prayer_times`.

2. Automatic Updates & Admin Sync Controls (/admin/prayer-times)

  1. Automatic On-Demand Sync: Whenever a visitor opens `/prayer-times` or a mosque microsite and today’s schedule for that zone is not yet cached in `prayer_times`, `prayer_day_schedule()` automatically fetches today’s and the current month’s schedule from JAKIM e-Solat.
  2. Platform Admin Console (/admin/prayer-times):
    • Open /{lang}/admin/prayer-times.
    • Click Sync All Active Zones to refresh all 60 verified JAKIM zones, or select an individual zone and click Sync Zone.
  3. Scheduled CLI Command (Cron / Task Scheduler):
    php database/manage.php prayer-sync

3. Troubleshooting Missing Prayer Times & API Failures

  • Case 1 — Mosque Has No Zone Assigned: The microsite displays a configuration notice. Remedy: Assign an official zone in /mosque-admin/prayer.
  • Case 2 — Temporary JAKIM e-Solat Outage: If live synchronization fails, `prayer_day_schedule()` falls back to the most recent cached schedule for that zone in `prayer_times` and displays an explicit Stale Schedule Warning indicating the cached date.
  • Case 3 — Inspecting Sync Failures: Open /admin/prayer-times and review the Recent Synchronization Logs table (`prayer_sync_logs`) to check the `http_code` and `error_message`.

Verified Screenshots & UI Reference

Platform JAKIM e-Solat Prayer Time Synchronization Console & Sync Logs (/admin/prayer-times). 🔍 Click image to enlarge preview

Input Fields & Options Reference

prayer_sync_logs ColumnDescription
period_typeSync scope: today, month, or catalogue.
statussuccess or failed.
records_writtenNumber of daily rows inserted/updated in prayer_times.
http_code & error_messageHTTP status code returned by e-Solat and diagnostic error message.

Expected Results

Prayer schedules across all 60 official JAKIM zones remain synchronized and resilient against temporary upstream outages.
Important Notes & Data Boundaries: The 60 official JAKIM prayer zones are seeded via `database/seeds/006_prayer_zones.php`.

Common Errors & Troubleshooting

If CLI or web sync fails with a cURL SSL certificate error on Windows/XAMPP, verify that curl.cainfo in php.ini points to a valid cacert.pem bundle and that outbound HTTPS to www.e-solat.gov.my is permitted.