2

I'm trying to install the Google Data PHP Library, and the install checker is telling me that DOM isn't installed. After some googling it appeared that I needed to install php-xml, but that was already installed. I then decided to reinstall php-xml, but after uninstalling it, it appears that it has disappeared from the standard repo's entirely.

My PHP was apparently configured with the following

'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'

How can I enable DOM without compiling PHP? (I'm using the standard repo one at the moment).

1 Answer 1

12

On CentOS you should be able to just run yum install php-dom or yum install php-xml. That will install php-xml and any dependencies (such as libxslt) and give you support for dom.

In older versions of CentOS such as 4 you had to use the --enablerepo=centosplus but this is not required in 5.

3
  • I have tried to do your solution but unfortunately package not available. I am using CentOS 5.5 my php version is 5.3
    – user58934
    Nov 2, 2010 at 8:24
  • Old post. But, thought it might be good to note here, '--disable-dom' still shows in php_info() after running yum install php-xml. But, it does work.
    – svidgen
    Dec 18, 2012 at 5:26
  • newest php-xml seems to be 5.3.3 in CentOS 6 now.
    – Sajuuk
    Jul 10, 2018 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.