🔧 QasraNet Diagnostics

PHP Environment

PHP Version8.1.2-1ubuntu2.23 ✓
PHP SAPIapache2handler
ROOT path/var/www/html
ext/pdoLoaded ✓
ext/pdo_mysqlLoaded ✓
ext/jsonLoaded ✓
ext/mbstringLoaded ✓
ext/opensslLoaded ✓

URL Routing

REQUEST_URI/diagnostics.php
REQUEST_METHODGET
SCRIPT_NAME/diagnostics.php
DOCUMENT_ROOT/var/www/html
HTTP_HOSThibot.live
App subdirectoryNo — root install ✓
.htaccess existsYes ✓
ServerApache/2.4.52 (Ubuntu)

Database Connection

config/database.phpFound ✓
Host127.0.0.1:3306
Databaseqasranet
Userroot
ConnectionConnected ✓
Table: users
Table: routers
Table: agents
Table: vouchers
Table: transactions
Table: printers
Table: sessions_cache
Users in DB2
Routers in DB1

Required Files

Main entry pointindex.php ✓
URL rewriting.htaccess ✓
App configconfig/app.php ✓
DB configconfig/database.php ✓
Database layercore/DB.php ✓
Base controllercore/Controller.php ✓
URL routercore/AppRouter.php ✓
RouterOS APIservices/RouterOSAPI.php ✓
Router managerservices/RouterManager.php ✓
Voucher serviceservices/VoucherService.php ✓
Authcontrollers/AuthController.php ✓
Dashboardcontrollers/DashboardController.php ✓
Voucherscontrollers/VoucherController.php ✓
Layoutviews/layout/master.php ✓
Login pageviews/auth/login.php ✓
Dashboard viewviews/dashboard/index.php ✓
404 pageviews/errors/404.php ✓

Quick Routing Test

If these links work, mod_rewrite is working correctly:

/login/vouchers/routers/agents/finance

Laragon Fix Instructions

IF you see this page via http://localhost/qasranet/diagnostics.php
  → App is in a subdirectory → TWO options:

OPTION A (Recommended): Use Laragon virtual host
  1. In Laragon → Menu → Apache → sites-enabled → add:
     qasranet.test → C:\laragon\www\qasranet
  2. OR: Laragon auto-creates *.test domain for each folder
     → Visit http://qasranet.test/

OPTION B: Fix subdirectory routing
  → Edit index.php, change this line in AppRouter::dispatch():
     $path = parse_url($uri, PHP_URL_PATH);
  → Add below it:
     $base = dirname($_SERVER['SCRIPT_NAME']);
     if ($base !== '/' && str_starts_with($path, $base)) {
         $path = substr($path, strlen($base));
     }

ALSO: Make sure mod_rewrite is enabled in Laragon:
  Menu → Apache → httpd.conf → uncomment:
    LoadModule rewrite_module modules/mod_rewrite.so
  AND in your VHost or httpd.conf, ensure:
    AllowOverride All
→ Go to App Home → Try Login