Re: Re: About DOM function in PHP
| From: | Nathan Nobbe | Date: | Sun, 08 Jul 2007 15:20:14 +0000 |
| Subject: | Re: Re: About DOM function in PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258473@lists.php.net to get a copy of this message | ||
My appologies M.
looking through the output of phpinfo() on a PHP5 install i have found a
line which says
dom
DOM/XML enabledwhich would allude to an ability to disable it. also, i was looking at the XSL extension and discovered Installation PHP 5 includes the XSL extension by default and can be enabled by adding the argument --with-xsl[=DIR] to your configure line. DIR is the libxslt installation directory. so the XSL extension seems to work differently than XML extension. both extensions are availble with the PHP5 core but where DOM is enabled by default XSL must be explicitly enabled. is there a portion of the documentation that you are aware of that clearly explains this? enabling and disabling core extensions.. thanks, -nathan On 7/8/07, M. Sokolewicz <tularis@php.net> wrote:
Actually, I'll have to correct you on that. Everything in PHP is an extension, even the standard functions (which are part of the 'standard' extension). Some extensions are "built-in" while others are not (ie. standard, in PHP5, the DOM module is built-in). However, this does not mean they are also enabled! There are hosts which build php with --disable-dom, there are also hosts which build php with --disable-libxml thus disabling all xml-related functionality. - Tul Nathan Nobbe wrote:not There is no DOM extension it is part of the PHP5 core; this from the DOM documantation <http://www.php.net/manual/en/ref.dom.php> in the online handbook: *Installation There is no installation needed to use these functions; they are part of the PHP core.* This leads me to beleive OP is using PHP4. Kelvin, create a phpinfo() script to determine if youre running PHP4 or PHP5. -nathan On 7/8/07, M. Sokolewicz <tularis@php.net> wrote:On 7/8/07, M. Sokolewicz <tularis@php.net> wrote: You don't have the DOM extension installed (req. PHP5 in case you're*Kelvin Park wrote:I'm getting the following fatal error message: *Fatal error*: Cannot instantiate non-existent class: domdocument in/home/hosting/infotechnow_com/htdocs/admin/inventory/catalog.php* on line *3 * when running this code: // Initialize new object for DOMDocument $doc = new DOMDocument(); What's the problem? **notYou don't have the DOM extension installed (req. PHP5 in case you'rerunning that either)... seems pretty obvious to me :) www.php.net/dom --