DOMXML in php5

Support/Development for PHP
CrK01
Forum User
Forum User
Posts: 94
Joined: Wed Jun 06, 2007 10:49 am

DOMXML in php5

Unread post 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,
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Have you restarted Apache after installing php-xml 5.2.6?
Lemonbit Internet Dedicated Server Management
CrK01
Forum User
Forum User
Posts: 94
Joined: Wed Jun 06, 2007 10:49 am

Unread post by CrK01 »

php-xml is installed since so many months ago ;) but never used domxml functions since now
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

What does php -i | grep DOM return?
Lemonbit Internet Dedicated Server Management
CrK01
Forum User
Forum User
Posts: 94
Joined: Wed Jun 06, 2007 10:49 am

Unread post by CrK01 »

Here you have:

php -i |grep DOM:


DOM/XML => enabled
DOM/XML API Version => 20031129
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post 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.
Lemonbit Internet Dedicated Server Management
CrK01
Forum User
Forum User
Posts: 94
Joined: Wed Jun 06, 2007 10:49 am

Unread post by CrK01 »

OK thanks, I will report that, very appreciate ;)
Post Reply