Skip to content

Commit

Permalink
Merge branch 'PHP-8.3' into PHP-8.4
Browse files Browse the repository at this point in the history
* PHP-8.3:
  [ci skip] Make build command for program using embed portable
  • Loading branch information
nielsdos committed Dec 24, 2024
2 parents e45fdd2 + a24eada commit ce322fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ PHP NEWS
(nielsdos)
. Fixed bug GH-17224 (UAF in importNode). (nielsdos)

- Embed:
. Make build command for program using embed portable. (dunglas)

- FFI:
. Fixed bug #79075 (FFI header parser chokes on comments). (nielsdos)
. Fix memory leak on ZEND_FFI_TYPE_CHAR conversion failure. (nielsdos)
Expand Down
4 changes: 2 additions & 2 deletions sapi/embed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ To compile this, we must point the compiler to the PHP header files. The paths t
We must also point the linker and the runtime loader to the `libphp.so` shared lib for linking PHP (`-lphp`) which is located at `$(php-config --prefix)/lib`. So the complete command to compile ends up being:
```bash
$ gcc \
$ cc \
$(php-config --includes) \
-L$(php-config --prefix)/lib \
embed_sapi_basic_example.c \
-lphp \
-Wl,-rpath=$(php-config --prefix)/lib
-Wl,-rpath,$(php-config --prefix)/lib
```

> :memo: The embed SAPI is disabled by default. In order for the above example to compile, PHP must be built with the embed SAPI enabled. To see what SAPIs are installed, run `php-config --php-sapis`. If you don't see `embed` in the list, you'll need to rebuild PHP with `./configure --enable-embed`. The PHP shared library `libphp.so` is built when the embed SAPI is enabled.
Expand Down

0 comments on commit ce322fd

Please sign in to comment.