| 1 |
<?php |
| 2 |
/** |
| 3 |
* Application configuration — SAMPLE. |
| 4 |
* |
| 5 |
* Copy this file to `config.php` and fill in your real values: |
| 6 |
* |
| 7 |
* cp config.sample.php config.php |
| 8 |
* |
| 9 |
* `config.php` holds secrets (database password, admin password hash) and must |
| 10 |
* be kept OUT of version control. This sample file is safe to commit; the real |
| 11 |
* `config.php` is not. On cPanel, create the DB + user in the control panel and |
| 12 |
* paste the credentials below. |
| 13 |
*/ |
| 14 |
|
| 15 |
// ---- Database (PDO / MySQL) ------------------------------------------------- |
| 16 |
define('DB_HOST', 'localhost'); |
| 17 |
define('DB_NAME', 'your_database_name'); |
| 18 |
define('DB_USER', 'your_database_user'); |
| 19 |
define('DB_PASS', 'your_database_password'); // MAMP default is 'root'; change for prod |
| 20 |
define('DB_CHARSET', 'utf8mb4'); |
| 21 |
|
| 22 |
// ---- Admin credentials (single user) --------------------------------------- |
| 23 |
// The password is stored as a bcrypt hash, never in plaintext. |
| 24 |
// Generate a hash with: |
| 25 |
// php -r "echo password_hash('your-password-here', PASSWORD_DEFAULT), PHP_EOL;" |
| 26 |
// then paste the result below. |
| 27 |
define('ADMIN_USER', 'admin'); |
| 28 |
// Replace the placeholder below with your own generated hash. The example value |
| 29 |
// is NOT a working password — the app will reject logins until you set a real hash. |
| 30 |
define('ADMIN_PASS_HASH', '$2y$12$replace_this_with_your_own_generated_bcrypt_hash_value'); |
| 31 |
|
| 32 |
// ---- Paths / routing -------------------------------------------------------- |
| 33 |
// BASE_PATH is the URL prefix the app is served under. |
| 34 |
// Local MAMP subfolder: '/pgh5' |
| 35 |
// Production domain root: '' |
| 36 |
define('BASE_PATH', ''); |
| 37 |
|
| 38 |
// Public origin of the site — scheme + host, no trailing slash, no BASE_PATH. |
| 39 |
// Used to build the absolute URLs that social-share metadata requires, e.g. |
| 40 |
// 'https://code.example.com'. Leave empty to derive it from the Host header. |
| 41 |
define('SITE_URL', ''); |
| 42 |
|
| 43 |
// Absolute filesystem path to the uploads directory (no trailing slash). |
| 44 |
define('UPLOAD_DIR', __DIR__ . '/uploads'); |
| 45 |
|
| 46 |
// Max upload size per file, in bytes (also bounded by php.ini upload_max_filesize). |
| 47 |
// Also governs each individual file extracted from an uploaded zip archive. |
| 48 |
define('MAX_FILE_SIZE', 25 * 1024 * 1024); // 25 MB |
| 49 |
|
| 50 |
// Ceiling on the total uncompressed size of a single zip import, in bytes. |
| 51 |
// Guards against zip bombs filling the disk during extraction. |
| 52 |
define('MAX_ZIP_TOTAL', 200 * 1024 * 1024); // 200 MB |
| 53 |
|