Commit 2eac250
committed
Support per-vhost app naming for FrankenPHP
Read NEW_RELIC_APP_NAME and NEW_RELIC_LICENSE_KEY from the request's
$_SERVER globals and pass them into nr_php_txn_begin(), so each
FrankenPHP virtual host can report under its own application name and
license key instead of inheriting a single process-wide config.
- php_frankenphp.c: resolve appname/license in the request handler's
fcall_begin hook (the FrankenPHP rinit emulation) and free them after
the transaction begins.
- php_rinit.c: do the same in the standard RINIT path, guarded by ZTS
and a frankenphp SAPI check so non-FrankenPHP SAPIs are unaffected.1 parent 173a048 commit 2eac250
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
154 | 166 | | |
155 | 167 | | |
156 | 168 | | |
| |||
0 commit comments