homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Apache2, php5 and domxml support
How to enable domxml support on apache2/php5?

10+ Year Member

Msg#: 3242934 posted 10:02 am on Feb 5, 2007 (gmt 0)


I'm running a local apache2 server on my ubuntu. I need the PHP DOM XML functions to work, but there seems to be no domxml support for my Apache2.

Apache Version Apache/2.0.55 (Ubuntu) PHP/5.1.2
Loaded core mod_access mod_auth mod_log_config mod_logio mod_env mod_setenvif prefork http_core mod_mime mod_status mod_autoindex mod_negotiation mod_dir mod_alias mod_so mod_cgi mod_php5 mod_rewrite mod_userdir
dom ---------
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.24
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

libxml ---------
libXML support active
libXML Version 2.6.24
libXML streams enabled

So, using a PHP function like domxml_open_file() should work. But it does not. I've got a message saying there's no such a function. I've tried the deprecated "xmldocfile()", but here again, no way to.

I've installed through synaptic the "XMLv2 module for php4", as there seems to be no equivalent for PHP5, but still no domxml support.

I also have a remote hosting. Everything is enabled the same way, and same error message. The phpinfo() shows that the server is "--dom-disabled". I've asked my hosting company to enable it. I guess that will work afterwards. My local server -I suppose- uses mod_so to load this module. I *may* have to set a loadModule directive somewhere, but where?





10+ Year Member

Msg#: 3242934 posted 2:55 pm on Feb 10, 2007 (gmt 0)

This is a PHP5 issue, not apache. There domxml functions have been removed in php5. php5 is much better at xml - take a look at the online documentation for more information.

If you are using legacy code that needs to use the domxml functions then you can still install a pecl package to make this possible. Since you are using ubuntu this is not too hard :-)

apt-get install php5-dev php-pear
pecl install domxml


WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3242934 posted 8:41 pm on Feb 19, 2007 (gmt 0)

Exactly, sabai.

The DOM extension allows you to operate on XML documents through the DOM API with PHP 5. For PHP 4, use DOM XML.

DOM Functions [php.net]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved