ID: 32438
Updated by: [EMAIL PROTECTED]
Reported By: franp at free dot fr
Status: Bogus
Bug Type: SimpleXML related
Operating System: FreeBSD 4.11
PHP Version: 5.0.3
New Comment:
>--with-dom is used to add the old DOM XML to PHP 4, not to
>PHP 5 (or am I wrong ?) .
yes, you're wrong.
your PHP basically was built without DOM support, as it was said.
Previous Comments:
------------------------------------------------------------------------
[2005-03-24 13:53:58] franp at free dot fr
Thinking of it again, I think you miss the point.
I am not talking of PHP 4, but PHP 5.
--with-dom is used to add the old DOM XML to PHP 4, not to PHP 5 (or am
I wrong ?) .
I am spkeaking of PHP 5.0.3 and the new built-in SimpleXML and DOM
functions.
So I re-explain what happens : all SimpleXML functions (and PHP5 XML
functions) work correctly, ONLY simplexml_import_dom() fails. That is
the strange point.
new DomDocument works ; simplexml_load_string() works, access to the
xml elements using the SimpleXML syntax (echo $s->racine->anelement)
works. But simple_import_dom() fails and only that.
------------------------------------------------------------------------
[2005-03-24 13:20:23] franp at free dot fr
OK but then shouldn't you pass that to a documentation "bug" or "lack
of precision" ?
The current manual states :
"
CXIII. SimpleXML functions
Installation
The SimpleXML extension is enabled by default. To disable it, use the
--disable-simplexml configure option.
"
and
"
XXVII. DOM Functions
Installation
There is no installation needed to use these functions; they are part
of the PHP core.
"
------------------------------------------------------------------------
[2005-03-24 07:45:06] [EMAIL PROTECTED]
You haven't build ext/dom in. Just add --with-dom to your configure
line..
------------------------------------------------------------------------
[2005-03-24 01:21:49] franp at free dot fr
Description:
------------
While all simplexml functions are working fine, simplexml_import_dom
just fails as if a non-existing function.
Reproduce code:
---------------
$doc = new DomDocument;
$doc->preserveWhiteSpace = TRUE;
$doc->loadXML($result);
$s = simplexml_load_string($result); // pass
$test = dom_import_simplexml($s); // pass
$s = simplexml_import_dom($doc); // broken !
Expected result:
----------------
Was working with PHP 5.0.0.
Apparently broke when passing to PHP 5.0.3.
Actual result:
--------------
Error code :
Fatal error: Call to undefined function simplexml_import_dom()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32438&edit=1