NoiseByNorthwest / php-spx

A simple & straight-to-the-point PHP profiling extension with its built-in web UI
GNU General Public License v3.0
2.13k stars 83 forks source link

The WEB GUI does not display any results. #178

Open McLotos opened 3 years ago

McLotos commented 3 years ago

I have a Notice: PHP message: PHP Notice: SPX: spx_profiler_stop (): profiling is not enabled in index.php

// index.php
<?php
spx_profiler_start();
require 'kernel.php';
$router->resolve();
spx_profiler_stop()
// docker-php-ext-spx.ini
extension=spx.so
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist=175.10.0.100
spx.data_dir=/var/www/html/spx_dumps
//SPX Control Panel command line prefix value: 
SPX_REPORT=full SPX_ENABLED=1 SPX_SAMPLING_PERIOD=5 SPX_METRICS=ct,it,io,ior,iow

php8, nginx, alpine OS The service processes about 1000 API requests per minute, but SPX Control Panel don't show statistics Screenshot from 2021-10-26 09-58-28

McLotos commented 3 years ago

spx_profiler_stop(): profiling is not enabled in logs

NoiseByNorthwest commented 2 years ago

Profiling is simply not enabled. What is the PHP SAPI ? If it is a CLI script the command line prefix must be added on your own, the control panel only displays it for the sake of convenience.