ID:               29386
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bugz at nagash dot org
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         DOM XML related
 Operating System: windows
 PHP Version:      5.0.0
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2004-07-26 14:22:12] [EMAIL PROTECTED]

Yep, it was On. Turning it Off solves the problem.

With compatibility On and error_reporting E_ALL|E_STRICT the code
outputs:
--
Strict Standards: Implicit cloning object of class 'DOMDocument'
because of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test
object(DOMDocument)#2 (0) {
}
<?xml version="1.0"?>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>
<HTML/>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML/>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML/>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#5 (0) {
}
<?xml version="1.0"?>
<HTML/>

Strict Standards: Implicit cloning object of class 'DOMElement' because
of 'zend.ze1_compatibility_mode' in E:\ftp\dom.test.
object(DOMElement)#5 (0) {
}
<?xml version="1.0"?>
<HTML/>

Strict Standards: Implicit cloning object of class 'DOMText' because of
'zend.ze1_compatibility_mode' in E:\ftp\dom.test.php
object(DOMText)#6 (0) {
}
<?xml version="1.0"?>
<HTML/>
--

------------------------------------------------------------------------

[2004-07-26 14:14:41] [EMAIL PROTECTED]

Check your php.ini file and see if zend.ze1_compatibility_mode = On
also change error_reporting to: error_reporting  =  E_ALL|E_STRICT

run it again, then if compat was on, change to off and run again.


------------------------------------------------------------------------

[2004-07-26 14:04:32] [EMAIL PROTECTED]

Done.
Still using latest PHP-CLI from PHP5.1 snapshot under Win2k - sorry, no
XP or any other Win32 system around here.

The code:
-----
<?
var_dump($doc = new DOMDocument("1.0"));
echo $doc->saveXML();
var_dump($root = $doc->createElement("HTML"));
echo $doc->saveXML();
var_dump($root = $doc->appendChild($root));
echo $doc->saveXML();
var_dump($head = $doc->createElement("HEAD"));
echo $doc->saveXML();
var_dump($head = $root->appendChild($head));
echo $doc->saveXML();
var_dump($title = $doc->createElement("TITLE"));
echo $doc->saveXML();
var_dump($title = $head->appendChild($title));
echo $doc->saveXML();
var_dump($text = $doc->createTextNode("This is the title"));
echo $doc->saveXML();
var_dump($text = $title->appendChild($text));
echo $doc->saveXML();
?>
-----

The output:
-----
object(DOMDocument)#2 (0) {
}
<?xml version="1.0"?>
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#5 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#5 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMText)#6 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMText)#6 (0) {
}
<?xml version="1.0"?>
<HTML/>
-----

The same code under Linux outputs this:
-----
object(DOMDocument)#1 (0) {
}
<?xml version="1.0"?>
object(DOMElement)#2 (0) {
}
<?xml version="1.0"?>
object(DOMElement)#2 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>
<HTML/>
object(DOMElement)#3 (0) {
}
<?xml version="1.0"?>
<HTML><HEAD/></HTML>
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML><HEAD/></HTML>
object(DOMElement)#4 (0) {
}
<?xml version="1.0"?>
<HTML><HEAD><TITLE/></HEAD></HTML>
object(DOMText)#5 (0) {
}
<?xml version="1.0"?>
<HTML><HEAD><TITLE/></HEAD></HTML>
object(DOMText)#5 (0) {
}
<?xml version="1.0"?>
<HTML><HEAD><TITLE>This is the title</TITLE></HEAD></HTML>
-----

I could try it with Win32 debug build too, if you tell me where I can
get it.

------------------------------------------------------------------------

[2004-07-26 13:49:39] [EMAIL PROTECTED]

I am unable to reproduce this under W2K and XP (using snaps and debug
builds). Can someone who can reproduce this try var_dumping that vars
after each line as well as doing a saveXML() on the doc each time to
try to pinpoint where the problem lies. libxml version is irrelevant as
I also tried from 2.5.11 - 2.6.11

------------------------------------------------------------------------

[2004-07-26 12:33:15] [EMAIL PROTECTED]

I can reproduce it with PHP 5.1.0-dev (cli) (built: Jul 26 2004
08:30:28) under Win2k.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/29386

-- 
Edit this bug report at http://bugs.php.net/?id=29386&edit=1

Reply via email to