The shared result image had one look, and it no longer matched the modern
frontend.
The renderer can now draw either design. The image follows the same
useNewDesign setting as the frontend, so a deployment has one switch rather
than two that can disagree, and classic remains the fallback.
- An explicit style query parameter overrides it, which is how the modern
frontend asks for the design it matches.
- The modern design reuses the frontend palette and shows the client, address
family and timestamp already present in the result data.
formatSpeedtestDataForImage() assigned the timestamp to itself, so the value
reached the image exactly as the database returned it. Every other field on
that list is passed through format(); this one reads like a placeholder that
was never filled in, and static analysis flags it as a self-assignment.
How much precision the column carries is decided by the backend, and the three
schemas shipped here disagree: MySQL's `timestamp` keeps none, PostgreSQL's
`timestamp without time zone DEFAULT now()` keeps microseconds and MSSQL's
`datetime` keeps milliseconds. A PostgreSQL deployment therefore drew
"2026-08-10 02:04:13.957789" where a MySQL one drew "2026-08-10 02:04:13".
* Initial plan
* Fix SQLite database path and add write permission checks
- Changed default SQLite database path from '../../speedtest_telemetry.sql' to '__DIR__/speedtest_telemetry.db' to keep it within the results directory
- Added directory existence and writability checks with helpful error messages
- Added SQLite database files to .gitignore to prevent committing user data
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
* Fix indentation to use tabs consistently in telemetry_db.php
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
* Remove temporary backup file
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
* Initial implementation of ipinfo.io offline database
* Removed unnecessary code
* add: download ipinfo db during docker build
* fixed workflow
* rename warning in workflow
* commit to trigger workflow
* Refactor getIP
* Improved UI
* Updated docker version with 5.4 changes
* Updated README.md
* Added fallback in getIP in case the offline db is missing
* Fixed typos
* just md linting
* Removed vscode stuff
* Implemented fallback in getIP for PHP<8 (returns only the IP)
* Updated doc.md
* Fixed comments in telemetry_settings.php
* New quick start video
* Corrected image name in doc_docker.md
* Replaced speedtest with just test in stats.php
* docker documentation update
* typo
---------
Co-authored-by: Federico Dossena <info@fdossena.com>
Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at>
* Create telemetry_mssql.sql
SQL to create the speedtest_users table on Microsoft SQL server.
This SQL is based on the original templates, and continues to uses nvarchar for all fields as the templates do – even though some of the fields should be int.
* Added support for Microsoft SQL Server
* New sanitycheck.php page plus required updates to telemetry_db.php
Created a sanity check page to verify that the required PHP extensions are installed, and that it is possible to connect to the database.
* Update README.md - MS SQL support
Added mention of Microsoft SQL Server as a supported DB engine.
* Added missing <tr> to sanitycheck.php
* put code to insert and query data from database into separate file
* simplify obfuscation salt file handling
* use new DB interaction functions in telemetry.php
* use new DB interaction functions in stats.php
and fix indentation levels
* format telemetry settings file
* use new function for interacting with DB in index.php
* move drawing of the image into function and try to comment each section with what it does
* reorder lines for parts of the image to align with the order they appear on the image
* bugfix: display obfuscated and deobfuscated id in stats if id obfuscation is enabled
* improve error handling
* add missing PHPDocs to functions
* imageftbbox returns an array on success and false on failure so to check if the font is usable, check if we got an array
* fix dsn for postgres
* fix limit sql statement for postgresql
* remove obsolete require statement
* use require instead of require_once since the settings file might need to be loaded multiple times
because it just contains plain variables which will just get loaded into the current scope
* move require statements to the top of the file
* make sure files are readable before requiring them
* add constant to refer to the telemetry settings file and check if it is readable before loading it
* return null if no speedtest result was found for the given id and show according message to the user instead of just exiting
* use existing constant instead of string for telemetry settings file name
* uniformly use single quotes instead of double quotes as most code places already used single quotes
* somehow some tabs sneaked in, replace them to uniformly use spaces
* mysql now uses pdo, too, reflect that in the requirements documentation
* pass username and password as constructor parameters instead of via DSN