Installation for PHP versions >= 7.4

The libxml extension is enabled by default, although it may be disabled with --without-libxml.

PHP uses pkg-config to select the right library file, header files, and compile flags to use for libxml2. To ensure that the desired version of libxml2 is selected, the PKG_CONFIG_PATH environment variable may be used to control the search path for pkg-config prior to running the configure script:

PKG_CONFIG_PATH="/path/to/libxml2/prefix/lib/pkgconfig:/lib/pkgconfig"

add a note add a note

User Contributed Notes 1 note

up
-44
fred5 at no dot spam dot co dot za
9 years ago
(I tried to enter a bug but the PHP version selection drop down isn't working so I have entered here)

This documentation is very confusing as it refers to xml2-config as a directory and file interchangeably (it is a file) ...so I'm not clear whether to use the containing directory or the actual file in the switch
To Top