# Sales Tax ERP — cPanel deployment

1. In **MultiPHP Manager**, select **PHP 8.3** for the domain/subdomain.
2. Import `2023011_dadisaletxdb (25).sql` into the intended cPanel database using phpMyAdmin.
3. Copy `classes/config.local.inc.php.example` to `classes/config.local.inc.php` and enter the final URL, database name, user and password.
4. Set `classes/config.local.inc.php` to permission **600** in cPanel File Manager.
5. Folders are packaged as **755** and normal files as **644**. Keep `admin/employeepics` and `admin/product_wording` at **775** only when uploads fail at 755.
6. Enable PHP extensions: `mysqli`, `fileinfo`, `gd`, `mbstring`, `iconv`, `zlib`, `openssl`, `session`, and `json`.
7. Open `/salesnew/admin/`, sign in, and test customer, supplier, purchase, Sales Tax invoice, payment, expense, stock, report, CSV and PDF workflows.

Do not upload the SQL dump, original ZIP, or any real database password inside the public web folder.

## Important fixes included

- PHP 8.3-safe opening tags, sessions and MySQLi result handling.
- Failed SQL queries now return `false` and are logged instead of being treated as successful saves.
- Legacy-compatible SQL mode is applied only to each ERP connection.
- Database credentials were removed from the distributed source and moved to an excluded local configuration file.
- PHPMailer was updated to 7.1.1 with a backward-compatible loader.
- PDF report logos use local filesystem paths instead of blocked HTTPS self-requests.
- Loader has a DOM-ready and timeout fallback.
- jQuery was updated to 3.7.1 with jQuery Migrate 3.4.1 for the existing UI theme.
- Customer payment figures are normalized to two decimals.
- Direct browsing of sensitive configuration, test, backup and directory contents is blocked.

## Permissions

| Item | Permission |
|---|---:|
| Folders | 755 |
| Normal files | 644 |
| `classes/config.local.inc.php` | 600 |
| Upload folders, only if required | 775 |

The ZIP stores these permissions. Some cPanel extractors may reset them, so verify the sensitive configuration file after extraction.
