Click to See Complete Forum and Search --> : Enabling XML DOM
Tswitz00
08-07-2006, 01:33 PM
I am running php 4.4.2 on linux (RH).
I am trying to get XML DOM extension working with no luck. I have both libxml2 and libxslt installed.
I have tried adding
--with-xml --with-libxml-dir --with-dom --with-dom-xslt
--with-dom
--with-libxml-dir=/path/lto/lib --with-dom
I have also tried going into the ext/domxml dir and doing a configure make install
All with no luck.
tsinka
08-09-2006, 03:58 PM
Did you compile php yourself or do you use the php that came with RH ? In the latter case there should be a php-domxml rpm package available. Just install that rpm package and enable the extension in php.ini.
Thomas
Tswitz00
08-09-2006, 05:20 PM
Compiled it myself. I do have a domxml folder in my ext directory that I tried to phpize and then I added extension=domxml.so to my ini all with no luck.
tsinka
08-09-2006, 05:27 PM
You need to add --with-php-config in order to compile the extension successfully.
Something like:
cd <phpsource>/ext/domxml
/path/to/phpize
./configure --with-dom --with-dom-xslt --with-php-config=/path/to/php-config
make
make install
the executables phpize and php-config are in <prefix>/bin where prefix is the installation prefix of php.
Tswitz00
08-09-2006, 05:52 PM
I ran that and I got this after a few lines
./configure: xrealloc: cannot reallocate 268435456 bytes (0 bytes allocated)
Tswitz00
08-09-2006, 06:07 PM
Ok it looks like it went all the way through this time and I restarted httpd and still doesnt appear to be working. I ran some code the requires it and says its still missing. Here is the configure output
: ./configure --with-dom --with-dom-xslt --with-php-config=/usr/local/bin/php-config --with-zlib-dir
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for egrep... (cached) grep -E
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking whether gcc and cc understand -c and -o together... (cached) yes
checking if compiler supports -R... (cached) no
checking if compiler supports -Wl,-rpath,... (cached) yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20020429
checking for re2c... (cached) exit 0;
checking for gawk... (cached) gawk
checking for DOM support... yes, shared
checking for the location of libz... yes
checking how to run the C preprocessor... (cached) gcc -E
checking for libxml version... >= 2.4.14
./configure: cd: yes: No such file or directory
checking for DOM XSLT support... yes
checking for DOM EXSLT support... no
checking for libxslt version... >= 1.0.18
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for /usr/bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/bin/nm -B
checking whether ln -s works... (cached) yes
checking how to recognise dependent libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking command to parse /usr/bin/nm -B output... (cached) ok
checking for dlfcn.h... (cached) yes
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for objdir... .libs
checking for gcc option to produce PIC... (cached) -fPIC
checking if gcc PIC flag -fPIC works... (cached) yes
checking if gcc static flag -static works... (cached) yes
checking if gcc supports -c -o file.o... (cached) yes
checking if gcc supports -c -o file.lo... (cached) yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... (cached) no
creating libtool
updating cache ./config.cache
creating ./config.status
creating config.h
tsinka
08-09-2006, 06:14 PM
Some allocation problems ... the problem may be that you didn't clean up thing before retrying to compile the extension.
Delete or rename the source directory and then extract the php tarball again to get a clean source directory.
Then phpize and configure the extension again.
Thomas
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.