docker run -tid `-v /opt/php/data:/data php:8.2`
# to get container id
docker ps
#
docker exec -it {container_id} /bin/bash
apt install build-essential autoconf libtool
apt install python
apt install libsqlite3-dev sqlite3
apt install bison
# i could miss something, could be extra python's packages required
git clone https://gitlab.gnome.org/GNOME/libxml2.git
cd libxml2 open xpath.c, find and increase XPATH_MAX_NODESET_LENGTH (my case was extra 0 added)
/*
* XPATH_MAX_NODESET_LENGTH:
* when evaluating an XPath expression nodesets are created and we
* arbitrary limit the maximum length of those node set. 10000000 is
* an insanely large value which should never be reached under normal
* circumstances, one would first need to construct an in memory tree
* with more than 10 millions nodes.
*/
#define XPATH_MAX_NODESET_LENGTH 10000000
./configure
make
make install
next step is compiling php [0] with new libxml:
git clone https://github.com/php/php-src –depth 1
cd php-src
./buildconf
./configure
make -j $(nproc)
# to check
./sapi/cli/php -i
to install on the system
make install