Comments (7)
Got it. It is not supposed to be exposed in this way, but rather served by PHP. Indeed the extension will intercept normal PHP execution for its routes (i.e. those prefixed with _spx
).
So what you need is simply to configure your vhost so that PHP is triggered for /_spx* URLs which is already the case for a classic "url rewriting" setup (e.g. a vhost configured for Symfony) where any non existing file is served by PHP.
from php-spx.
For security reasons SPX does not intercept normal execution by default, you need to be authenticated (both ip & key in query string / header / cookie).
If your ip is properly set, simply go to: http://<your host>/_spx/?SPX_KEY=dev
You can also check your PHP log, SPX outputs some NOTICE messages.
from php-spx.
Ah! It's the IP because I'm running it in docker. I understand now. All is working well. Thanks for indulging me being a bit stupid here. I think I'll make a fork and pull request an update to the installation instructions to make all of this clear for slower people like me 😅.
from php-spx.
"Command line prefix" is a recent feature, not documented yet.
Which browser ? I guess the "/_spx/data/metrics" endpoint does not work, can you confirm it with the network pane of the debug console ?
from php-spx.
Confirming that /_spx/data/metrics does not work: https://imgur.com/a/810MoBX
The browser is Google Chrome Version 64.0.3282.186 (Official Build) (64-bit)
Maybe I'm not setting this up correctly? All I did really was make a symbolic link between the WebUI folder and /var/www/html.
EDIT: Thanks for the quick response!
from php-spx.
Okay, set-up a simple rewrite rule:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /_spx* /index.php
</VirtualHost>
Based on your last message, my understanding is that SPX should intercept the execution of index.php, and run the website instead, but I am still getting the phpinfo() page (I set index.php to it). It is reporting that the SPX extension is active though: https://imgur.com/a/5DhY7Tl
from php-spx.
Your welcome, thanks for your feedback!
And yes feel free to make a PR to improve the doc (#54).
from php-spx.
Related Issues (20)
- Core dumped when executing with long arguments HOT 5
- Link to code.jquery.com HOT 2
- UI / Report: highlight a partircular (or pattern) function call count as a dynamic metric
- Feature request: visualize static and instance methods differently
- Feature Request: SQL Query time HOT 1
- Accessibility issue. Light mode needed as not everyone can see the dark contrast. HOT 2
- PHP 5.4 support HOT 1
- Web UI not loading HOT 1
- Support for PHP 8.3
- Potential misinformation about leak HOT 3
- No UI on site hosted behind Reverse Proxy HOT 3
- ESM modules resolution error HOT 1
- File not found. HOT 1
- Install fails in MacOS Ventura HOT 4
- SPX does not intercept when using built-in server HOT 1
- configure error on macOS : cannot find zlib HOT 3
- spx.so: undefined symbol: gc_globals HOT 4
- perf_events HOT 7
- installation documentation not super clear HOT 1
- Callgraph and visualization generated with sampling can be inaccurate and misleading as described in the the description HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-spx.