Most of them can be found through ldd, but some others are unknown.
Most of them can be found through ldd, but some others are unknown.
ldd php-fpm
is to view the shared libraries that static binary files depend on.
You can use sudo lsof -p PID
to view the files opened when the program is running, including dependent shared libraries.
It should be noted that some do not PHP extensions compiled into PHP-FPM (also so files) sometimes depend on other libraries, so you have to find out which libraries PHP-FPM depends on. It is best to load all the PECL extensions you use and run them with lsof to view.
If you want to package a PHP binary package that can be decompressed and used across Linux, you can read this article of mine.
The Android version of PHP I compiled by myself is completely statically linked with dependent libraries.