php-spx icon indicating copy to clipboard operation
php-spx copied to clipboard

Roadrunner compatible

Open cidious opened this issue 3 years ago • 6 comments
trafficstars

Is it compatible with roadrunner?

cannot get the SPX UI with ?SPX_KEY=dev&SPX_UI_URI=/ query applied

note it differs from php-fpm env.

CLI: SPX_ENABLED=1 SPX_KEY=dev SPX_FP_LIVE=1 composer works OK (Global stats. Flat profile etc)

versions: PHP 8.1.7 roadrunner 2.10.5 SPX 0.4.12 running in docker env.

cidious avatar Jun 30 '22 18:06 cidious

No your use case is currently not supported. The web UI is served through the interception a PHP script's execution via a web SAPI (e.g. fastcgi).

The next step could be making the web UI standalone, it will brings lots of flexibility like serving it from any context.

NoiseByNorthwest avatar Jun 30 '22 22:06 NoiseByNorthwest

Hi. I have same issue. Would be appreciated, if you add support of RoadRunner

vladdnepr avatar Oct 30 '22 17:10 vladdnepr

Maybe you do some internal function like spx_profiler_start? Then I can put it in desired place in my project

vladdnepr avatar Oct 30 '22 17:10 vladdnepr

Here is an easy way to set up a local server (using PHP's builtin server) serving the web UI https://github.com/NoiseByNorthwest/php-spx/issues/201#issuecomment-1279780817

NoiseByNorthwest avatar Oct 31 '22 10:10 NoiseByNorthwest

Not only for Roadrunner, it'll be useful for Workerman, Reactphp, Amp, .... And perhaps will be good to send the info live, via a websocket for example. As they are persistent running apps.

joanhey avatar Nov 14 '22 16:11 joanhey

this could be also usable for swoole and openswoole

Rastusik avatar Feb 01 '23 13:02 Rastusik