When `mysqli_connect` fails, `$link` becomes false, and the `or` branch is taken, which uses `mysqli_error($link)`, which in turn fails because `$link` is false.
Since it's correctly checking `mysqli_connect_errno()` in the next line, just removing the `or` suffices.
Per report by jonhboy Resident.
It served no practical purpose and used undefined variables to define values that weren't used anyway.
Also, comment out the variables that aren't used after parsing the X-SecondLife headers.
All variable values in SQL statements should use IntSQL or StrSQL as appropriate, rather than variables directly, with the exception of the table name.
This is akin to using htmlspecialchars to include text in HTML, or urlencode to include text in a URL. Normally you have the text in raw form and convert it as appropriate depending on where you're inserting it.
- Get rid of Y2K38 problems https://xkcd.com/607/
- This also removes default value and on-update value for the timestamp, but these were being set explicitly so no harm done.
- Set the text field's character set to UTF-8.
- Set the link's character set to UTF-8.
This will allow replacing the main file without needing to re-add the settings.
For example, settings.php can be always kept up-to-date locally via a symbolic link, without altering the configuration.
* Hot fix for settings.php
It's failing whenever there's more than 1 chunk.
Fixes#25.
* Escape $ip_packed.
It can contain arbitrary binary characters, so it needs escaping.