You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/guide/extension-notes.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,10 +80,9 @@ and this extension cannot be compiled into php by static linking, so it cannot b
80
80
81
81
## xdebug
82
82
83
-
1. Xdebug is only buildable as a shared extension. On Linux, you need to use static-php-cli with SPC_LIBC=glibc and then compile php-xdebug from source with the option `--with-php-config=/path/to/buildroot/bin/php-config`.
84
-
2. The macOS platform can compile an xdebug extension under PHP compiled on the same platform,
85
-
extract the `xdebug.so` file, and then use the `--no-strip` parameter in static-php-cli to retain the debug symbol table and add the `ffi` extension.
86
-
The compiled `./php` binary can be configured and run by specifying the INI, eg `./php -d 'zend_extension=/path/to/xdebug.so' your-code.php`.
83
+
1. Xdebug is only buildable as a shared extension. On Linux, you need to use static-php-cli with SPC_LIBC=glibc.
84
+
2. When using Linux/glibc or macOS, you can compile Xdebug as a shared extension using --build-shared="xdebug".
85
+
The compiled `./php` binary can be configured and run by specifying the INI, eg `./php -d 'zend_extension=/path/to/xdebug.so' your-code.php`.
87
86
88
87
## xml
89
88
@@ -126,8 +125,8 @@ For details on the solution, see [FAQ - Unable to use ssl](../faq/#unable-to-use
126
125
127
126
## ffi
128
127
129
-
1. Due to the limitation of Linux system, you cannot use it to load other `so` extensions in the purely static compiled state (spc defaults to pure static compilation).
130
-
Linux supports loading so extensions only if they are non-statically compiled. If you need to use the ffi extension, see [Compile PHP with GNU libc](./build-with-glibc).
128
+
1. Due to the limitation of musl libc's static linkage, you cannot use ffi because dynamic libraries cannot be loaded.
129
+
If you need to use the ffi extension, see [Compile PHP with GNU libc](./build-with-glibc).
131
130
2. macOS supports the ffi extension, but errors will occur when some kernels do not contain debugging symbols.
Copy file name to clipboardExpand all lines: docs/en/guide/manual-build.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -314,6 +314,7 @@ You can try to use the following commands:
314
314
-`--with-suggested-exts`: Add `ext-suggests` as dependencies when compiling
315
315
-`--with-suggested-libs`: Add `lib-suggests` as dependencies when compiling
316
316
-`--with-upx-pack`: Use UPX to reduce the size of the binary file after compilation (you need to use `bin/spc install-pkg upx` to install upx first)
317
+
-`--build-shared=XXX,YYY`: compile the specified extension into a shared library (the default is to compile into a static library)
317
318
318
319
For hardcoding INI options, it works for cli, micro, embed sapi. Here is a simple example where we preset a larger `memory_limit` and disable the `system` function:
0 commit comments