Ben
Ben

Reputation: 91

Why isn't XML enabled in my Apache PHP build?

I am running PHP Version 7.1.33 on CentOS Linux 6.10 and having issues with getting the PHP XML Module installed.

I have ran a list of installed modules via YUM and I have the following:

php-cli.x86_64                            7.1.33-10.el6.remi           @remi-php71
php-common.x86_64                         7.1.33-10.el6.remi           @remi-php71
php-gd.x86_64                             7.1.33-10.el6.remi           @remi-php71
php-json.x86_64                           7.1.33-10.el6.remi           @remi-php71
php-mcrypt.x86_64                         7.1.33-10.el6.remi           @remi-php71
php-mysqlnd.x86_64                        7.1.33-10.el6.remi           @remi-php71
php-opcache.x86_64                        7.1.33-10.el6.remi           @remi-php71
php-pdo.x86_64                            7.1.33-10.el6.remi           @remi-php71
php-pear.noarch                           1:1.9.4-5.el6                @base
php71.x86_64                              2.0-1.el6.remi               @remi-safe
php71-php-cli.x86_64                      7.1.33-10.el6.remi           @remi-safe
php71-php-common.x86_64                   7.1.33-10.el6.remi           @remi-safe
php71-php-json.x86_64                     7.1.33-10.el6.remi           @remi-safe
php71-php-xml.x86_64                      7.1.33-10.el6.remi           @remi-safe
php71-runtime.x86_64                      2.0-1.el6.remi               @remi-safe

However in my phpinfo file there is no mention of the XML module. When I run php -m I get the following:

[PHP Modules]
bz2
calendar
Core
ctype
curl
date
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
sockets
SPL
sqlite3
standard
tokenizer
Zend OPcache
zlib

I have tried various other Yum packages but it asks for dependencies.

Upvotes: 0

Views: 267

Answers (1)

Remi Collet
Remi Collet

Reputation: 7031

You mix php-* packages php71-php-* packages, this cannot work

Explanation in the FAQ

So, you probably need php-xml (not php71-php-xml)

Also explained by the Wizard

Notice: CentOS 6 have reached its end of life 1 year ago, I strongly recommend you switch to a supported distribution (ex: CentOS 7 or CentOS 8 Stream).

The "remi" repository is closed and won't receive any update.

The "EPEL" repository is also closed (used by "remi").

So you are missing 1 year of security updates.

Upvotes: 2

Related Questions