Skip to content

Releases: stephen1137/phpray

PHPRay 0.15.6 — the first five minutes

Choose a tag to compare

@stephen1137 stephen1137 released this 22 Sep 02:02

The extension is unchanged in this release. Its source has not moved since
0.15.5, so the .so files still report 0.15.5 and that is deliberate: a
version number describes the artifact, and this artifact did not change. The
collector and the MCP server are at 0.15.6.

Everything here came from walking the new-user path from zero in a clean
container, the way a stranger does it. Real people started downloading the
installer this week, so these are the first things they meet.

Fixed — "start the collector manually" was a dead end

Without systemd (containers, WSL, macOS, some shared hosts) the installer said
systemctl not available - start the collector manually and stopped there.
phpray-collector prints the usage screen; phpray-collector daemon starts but
serves no dashboard. The command that actually works —
phpray-collector serve -c /etc/phpray/collector.toml -addr 127.0.0.1:9191
lived only inside the systemd unit, where someone without systemd never looks.

The installer now prints that command, and so does phpray top when the
collector is not answering.

Fixed — a fresh install greeted you with five errors

The collector logged JSONL error: no such file or directory every five
seconds on a new machine. The file was missing because PHP had not served a
request yet — a state that cannot be avoided and is not a failure. Someone who
had just installed an unfamiliar tool saw five errors in the first twenty-five
seconds.

It now says once, calmly, that it is waiting and what to do about it. error
is reserved for things that are actually wrong.

Fixed — the only upgrade link in the free product pointed at Polish

The local dashboard is entirely in English, and its "Connect to PHPRay Cloud"
button linked to the Polish page. It now links to /en/cloud.

Fixed — the MCP binary reported the wrong version

phpray-mcp in the 0.15.5 downloads identified itself as 0.15.4: its version
constant was bumped after the release artifacts were built.

Added — the MCP server also speaks HTTP

phpray-mcp now serves the Model Context Protocol over HTTP as well as stdio,
which is what runs the hosted endpoint at https://phpray.dev/mcp. The token
comes from the Authorization header of each request, so one process serves
many users and stores no credentials.


Downloads

The installer picks the right files for you:

curl -fsSL https://phpray.dev/install.sh -o phpray-install.sh
sudo bash phpray-install.sh

Every artifact is also under https://phpray.dev/dl/v0.15.6/ with a
SHA256SUMS next to it. The hosted MCP endpoint needs no download at all:

claude mcp add --transport http phpray https://phpray.dev/mcp

PHPRay 0.15.5 — ring buffer data integrity

Choose a tag to compare

@stephen1137 stephen1137 released this 22 Sep 00:13

The extension changes in this release (0.15.3 → 0.15.5) and every variant was
rebuilt: 24 .so files, PHP 8.0–8.5 × glibc/musl × amd64/arm64. The glibc builds
still cap at GLIBC_2.17 so they load on CloudLinux 8 and AlmaLinux 8.

Fixed — data integrity in the ring buffer

The writer reserved space with a CAS on write_pos and only then copied the
record. From the moment the CAS landed the reader considered the slot ready,
while the bytes in it were still the tail of a record from the previous lap of
the buffer — so it could read that as a new trace. On a production server this
put a row into the database whose host column held a fragment of SQL, with
status 28521 and a duration of 8 529 657 644 052 ms.

The publication order is now RESERVED → length → payload → real type, with the
last store carrying a release barrier. The reader only accepts a record with a
non-zero length and a type other than RESERVED, and it zeroes the header after
consuming, so a freshly reserved slot always reads as length zero. If a PHP
process dies between reserving and writing, the reader abandons that slot after
two seconds instead of stalling the ring for good.

The byte layout does not change, so the ring version stays 5: bumping it would
stop collectors that customers already have from reading the ring at all.

A second line of defence rejects traces that cannot come from a real request —
an impossible HTTP status, a duration over a day, a timestamp from before 2020.

Fixed — first five minutes after install

  • phpray top asks the API for a window two minutes wider than the one it
    displays and trims to the second itself. The API counts whole minutes, so
    window=1 could exclude the current, incomplete minute — which is exactly
    where the newest requests are.
  • The installer's "Next steps" said phpray-collector top while the README and
    the site say phpray top. Both work; now they read the same.
  • The local dashboard's "Top Components" card rendered a bare table header when
    the component list was empty, so the flagship feature looked broken. It now
    explains why there is no data and what to switch on.
  • The dashboard no longer requests a missing /favicon.ico, and the token field
    sits in a form with a hidden username field, so the browser console is clean.

Changed — MCP output for agents

phpray_components reported sums as raw milliseconds (2528110). That is
correct and unreadable: the answer goes to a language model, which will read it
out as "two and a half million milliseconds". Sums are now 42.1 min, 1.1 h,
3.5 s, and the column names say which figure is a total and which is per
request.


Downloads. The extension is built for PHP 8.0–8.5 × glibc/musl × amd64/arm64 (24 files); glibc builds cap at GLIBC_2.17 so they load on CloudLinux 8 and AlmaLinux 8. Collector, MCP server, .deb and .rpm packages are attached, and the full set with checksums is at https://phpray.dev/dl/v0.15.5/

curl -fsSL https://phpray.dev/install.sh -o phpray-install.sh
less phpray-install.sh          # it asks for root; read it first
sudo bash phpray-install.sh && phpray top