PHP_XML Install

Topics: Developer Forum
Mar 5, 2009 at 8:40 AM
Edited Mar 5, 2009 at 8:41 AM
I've been attempting to install PHP including PHP_XML for the last several hours to fix the problem:
Class 'XMLWriter' not found in /usr/local/apache2/htdocs/PHPExcel/Shared/XMLWriter.php on line 65

version: 1.6.5
os: Fedora Core 10

Here is my  configure command:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --without-mysql --enable-xmlreader=shared --enable-xmlwriter=shared --enable-zip --with-zlib-dir=/usr/local/lib -enable-xml -with-libxml-dir=/usr/lib

How can I make sure it is installed, or install it if it isn't? I'm not sure what line of phpinfo is applicable.

Developer
Mar 5, 2009 at 11:31 PM
I thought XMLWriter would be available in a standard installation?

Here's what phpinfo might look like when XMLWriter is available:
http://img216.imageshack.us/img216/9333/phpinfo.png

Mar 9, 2009 at 9:35 AM
Edited Mar 9, 2009 at 9:37 AM
Thanks for the help. For some reason, the package manager on Fedora Core 10 doesn't have XMLWriter in the PHP package. I needed to download and reinstall from source: PHP, zlib, zip, xmllib, and httpd.

Here is the PHP configure command I used:

'./configure' '--build=i386-redhat-linux-gnu' '--host=i386-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' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--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' '--without-mime-magic' '--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' '--disable-json' '--without-pspell'

I hope gd is only needed if my documents will have gifs. XMLReader and XMLWriter are included from the additional .ini files:

etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlrpc.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini

It's probably not the best setup right now, but at least it works.