Page 1 of 1

DOMXML in php5

Posted: Tue Oct 28, 2008 10:36 am
by CrK01
Hello all,

i need domxml on my server.

It's a centOS server, with asl, php 5.2.6, apache ( from ART repo ) etc.

The problem is that domxml isn't working.
I've searching configs and in /etc/php.d/dom.ini shows:

; Enable dom extension module
extension=dom.so

I have all rpms installed:

php-5.2.6-1.el5.art
php-common-5.2.6-1.el5.art
php-ldap-5.2.6-1.el5.art
php-suhosin-0.9.24-1.el5.art
php-devel-5.2.6-1.el5.art
php-cli-5.2.6-1.el5.art
php-gd-5.2.6-1.el5.art
php-imap-5.2.6-1.el5.art
php-xml-5.2.6-1.el5.art
php-mysql-5.2.6-1.el5.art
php-mbstring-5.2.6-1.el5.art
php-mcrypt-5.2.6-1.el5.art
php-pear-1.5.0-5.el5.art
php-pdo-5.2.6-1.el5.art
php-xmlrpc-5.2.6-1.el5.art

But when I run a php that needs domxml:

Fatal error: Call to undefined function domxml_open_mem() in

thanks,

Posted: Tue Oct 28, 2008 12:04 pm
by breun
Have you restarted Apache after installing php-xml 5.2.6?

Posted: Tue Oct 28, 2008 12:39 pm
by CrK01
php-xml is installed since so many months ago ;) but never used domxml functions since now

Posted: Tue Oct 28, 2008 1:13 pm
by breun
What does php -i | grep DOM return?

Posted: Tue Oct 28, 2008 2:13 pm
by CrK01
Here you have:

php -i |grep DOM:


DOM/XML => enabled
DOM/XML API Version => 20031129

Posted: Tue Oct 28, 2008 5:30 pm
by breun
According to http://www.php.net/manual/en/function.d ... en-mem.php the domxml_open_mem() function is only available in PHP 4, not in PHP 5. The domxml extension was replaced with the dom extension in PHP 5.

Apparently there is a wrapper available at http://alexandre.alapetite.net/doc-alex ... php4-php5/ but if at all possible I'd opt for changing the code to run on PHP5/DOM instead of staying with the PHP4/DOMXML API.

Posted: Tue Oct 28, 2008 5:35 pm
by CrK01
OK thanks, I will report that, very appreciate ;)