AL QARI AUTO MAINTENANCE | V5.1 SHARED HOSTING
Existing PHP website, booking, owner reports, employee and customer portals.

1. FILES: Extract this ZIP on your computer. In File Manager, identify the document root for the intended domain. On a standard cPanel primary domain, it is /home/YOURACCOUNT/public_html/. Place the CONTENTS of public_html there, including its .htaccess. Put al_qari_app at /home/YOURACCOUNT/al_qari_app/, alongside public_html. Keep Al_Qari_Setup on your computer. Never extract the entire archive inside public_html.
   Use an empty domain document root or back up any existing site before changing it. For an addon domain with a different document root, edit AL_QARI_APP at the top of the public index.php to the absolute private folder path. Use the site at the root of its chosen domain or subdomain.
2. DATABASE: Create a new MySQL/MariaDB database and a dedicated user, then grant that user privileges on this database. In phpMyAdmin, select that empty database and import Al_Qari_Setup/install.sql once. It creates the full current schema, with no accounts or customer records. Do not import install.sql into an existing installation.
3. CONFIG: Edit al_qari_app/config.php. Set database host/port and the full database and user names (including any account prefixes), the database password and the verified HTTPS base_url. Keep the production mode as supplied. If credentials contain a single quote or backslash, escape it inside the PHP single-quoted string.
4. HOST SETTINGS: Enable HTTPS for the domain. Use PHP 8.1+ with PDO MySQL, sessions, ctype and GD with JPEG/PNG/WebP support. Enable private error logging and disable public error display. The PHP process must be able to write to al_qari_app/private, including photos and sessions. Keep that directory outside document root. Configure upload_max_filesize at least 8M and post_max_size at least 36M. For Apache, allow the provided .htaccess. If TLS terminates at a proxy, ask the host to provide its trusted HTTPS flag to PHP.
5. FIRST OWNER: On your Windows computer with PHP installed, double-click Al_Qari_Setup/Create-Owner-Windows.bat. Enter your real email. Store the temporary password shown, and import the newly generated owner-....sql in phpMyAdmin into the same database. Log in at /?page=login&portal=owner and set your own password. The temporary password is not saved in the SQL file. If you regenerate the file, use the password printed for the SQL file you actually import.
   Alternative with hosting terminal: run php /home/YOURACCOUNT/al_qari_app/tools/create-admin.php your-real-email. Enter a strong owner password at the prompt. Use only one owner creation method.
6. OPEN BOOKINGS: Owner > Workshop settings. Set actual working days and time slots, enable approved services, save verified contact details and WhatsApp number. Until the owner sets time slots, public booking has no available times. Create real staff and customer accounts under Customers & staff.
7. LOGIN BOOKMARKS: Append /?page=login&portal=owner, /?page=login&portal=technician or /?page=login&portal=customer to your HTTPS domain. The public header also has Log in. Local testing accounts and records are excluded from production.
8. CHECK: From a phone, submit a booking, confirm it as owner, link the customer, create a vehicle and assigned job, upload a photo as technician and view it as that customer. Verify another customer's login cannot open the same photo. Check owner reports, WhatsApp drafts, and your backups of the database and private photos.
Existing V5/V5.1 MySQL database: back up first, reuse the database and private photo directory, configure the production connection, and use the existing owner account. No new schema import or owner creation is required. For earlier MySQL versions see upgrades/ and run only the migration(s) from your actual software version. The local JSON testing dataset does not automatically transfer to production.
