Configuration
Firefly QSL needs very little configuration. Everything is in one file,
config.php, in the application directory. The QSL card itself is set
up in the web interface with the Card Designer, not in
the configuration file.
Settings
| Setting | Purpose |
|---|---|
$club_call |
The club's callsign. This is also the login name. It must be UPPERCASE. |
$club_name |
The club's name, shown in page headers and on the search results. |
$club_password |
The login password. Logins are refused while it is the shipped default. |
$club_password_hash |
A hash of the password, used instead of $club_password when set. See Passwords. |
$db_server |
The database server, usually localhost. |
$db_db |
The database name. qsl.sql creates fireflyqsl. |
$db_user |
The database user. |
$db_pass |
The database user's password. |
$qsl_page_note |
HTML shown on the home page under the QSO dates. Use it for paper QSL routes, LoTW notes and so on. |
$install_check_enabled |
true lets check_install.php run without logging in. Leave it false except while installing. |
A typical configuration:
$club_call = "Q1ABC";
$club_name = "Questionable ARC";
$club_password = "";
$club_password_hash = '$2y$10$...';
$db_server = "localhost";
$db_db = "fireflyqsl";
$db_user = "fireflyqsl";
$db_pass = "a-strong-password";
$qsl_page_note = '<p><strong>Notes on QSLs:</strong></p>
<p>For paper QSL, please QSL via our manager Q1XYZ.</p>
<p>Electronic logs available from LoTW.</p>';
$install_check_enabled = false;
The home page note is HTML
$qsl_page_note is printed onto the page as it is, so it can contain
links and formatting. Use single quotes around it so PHP does not try
to read $ signs inside it.
Passwords
You can store either the password or a hash of it.
Plain password. Set $club_password and leave $club_password_hash
empty. Simple, but anyone who can read the configuration file can read the
password.
Password hash (recommended). Leave $club_password empty and set
$club_password_hash. To make a hash, run this on any computer with PHP,
replacing your password:
php -r 'echo password_hash("your password", PASSWORD_DEFAULT), "\n";'
Copy the output (it starts with $2y$) into the configuration, inside
single quotes:
$club_password_hash = '$2y$10$Jg0iV1E0YQ...';
When $club_password_hash is set, $club_password is ignored.
config.local.php
Settings in a file named config.local.php, next to config.php, override
the ones in config.php. Git ignores that file and the web server refuses
to serve it, so:
- passwords kept there stay out of the repository
- your settings survive upgrades, because new releases replace
config.phpbut never ship aconfig.local.php
Put only the settings you change into it:
<?php
$club_call = "Q1ABC";
$club_name = "Questionable ARC";
$club_password_hash = '$2y$10$Jg0iV1E0YQ...';
$db_pass = "a-strong-password";
This is the recommended way to configure Firefly QSL.