When the other server of a multi-server install did not answer,
file_get_contents() raised a PHP warning whose text is the call and its
URL, ?auth=<hash> or user=/pass= included, and PHP wrote it to the web
server's error log (Event.php, Filter.php). The same happened with the
image proxy's digest retry (camera user:password@) and the X-Frame
check of a website monitor (get_headers()), which also took the false
it returns on failure for an array.
Fetch with @ and log lastErrorForLog(), the reason without the call
and its URL, next to urlForLog() of the URL. Server::SendToApi()
already used @ and now logs the reason too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Event.php, Server.php and Filter.php call the API or index.php of
another server with the auth relay appended (?auth=<hash>, or with
ZM_AUTH_RELAY=plain the user's username and password) and logged that
URL, at debug level before the call and at Error level when the other
server did not answer. Error reaches the Logs table at the default
database log level. Log it through urlForLog(), without the query.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
06801955a bound $this->Id() directly in the stats lookup. On a
single-server install the Server object's Id() is empty/undef and
zmstats.pl writes the rows under ServerId=0 (ZM_SERVER_ID ? ZM_SERVER_ID
: 0), so the query matched nothing and CpuLoad/load reported as -1.
Coerce a falsy id to 0 so the reader mirrors the writer; a real
(multi-server) id still passes through unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Server.php's ReadStats() query (SELECT ... WHERE ServerId=? ORDER BY
TimeStamp DESC LIMIT 1) had no supporting index, forcing a full table
scan on every page load that shows server stats. Add a composite
(ServerId, TimeStamp) index via zm_update-1.39.18.sql (idempotent,
checked against INFORMATION_SCHEMA.STATISTICS) and zm_create.sql.in
for fresh installs. Keep the existing TimeStamp-only index, since
zmstats.pl's prune DELETE filters by TimeStamp alone.
Also query ReadStats() with the server's actual Id() instead of
coercing Id() <= 1 to 0.
Bump version.txt and the redhat spec Version to 1.39.18.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7jeoG8ptXRpXxif2JqkD7
* experiment with namespaces on the Server class
* experiment with namespaces on the Server class
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects
* Implement the ZM namespace on objects