Bug #66084 [ReO]: simplexml_load_string() mangles empty node name

From: Date: Wed, 27 May 2015 11:41:59 +0000
Subject: Bug #66084 [ReO]: simplexml_load_string() mangles empty node name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192911@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66084&edit=1

 ID:                 66084
 Updated by:         ab@php.net
 Reported by:        php at kenman dot net
 Summary:            simplexml_load_string() mangles empty node name
 Status:             Re-Opened
 Type:               Bug
 Package:            SimpleXML related
 Operating System:   Win7
 PHP Version:        5.5Git-2013-11-12 (snap)
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

ups, i meant ./configure --prefix=/install/to/libxml-x.y.z ... was too late at night :)

Oki, please ping back when you think i should do the verify builds.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2015-05-27 11:08:57] cmb@php.net

Ah, I see, Anatol. I'll do the testing under Linux; I have to set
up a build environment (VM) first, so it'll take a while.

FWIW: I've already committed more changes to the mentioned branch;
tested with 5.5.25, 5.6.9 and current master on Windows.

------------------------------------------------------------------------
[2015-05-27 00:25:41] cmb@php.net

Related To: Bug #68946

------------------------------------------------------------------------
[2015-05-26 20:40:32] ab@php.net

Christoph,

building older libxml on Windows doesn't make sense, so you can spare the work. libxml 2.9.2 is
used now from 5.5 to 7 and people usually use our dep builds, thus the firm versions we've
tested. Thus testing 2.9.2 which is provided on Windows is enough.

But the change will most likely affect Linux as the variety of libxml versions is used in the
distributions while the code in PHP is the same (fe see the description of this report) and is also
shared across PHP versions. On Linux it's done using say ./configure=/install/to/libxml-x.y.z
&& make install and then pointing PHP to there --with-libxml-dir.

Thanks

------------------------------------------------------------------------
[2015-05-26 19:06:17] cmb@php.net

Thanks, Anatol, for the quick reply. I've already committed tests
for four closely related bug reports (actually, they're duplicates)
to my sxe-var-dump branch[1]. However, I've noticed that bug #68946
and bug #67572, which I deemed related to this one, won't be fixed
with the given patch. I'll investigate.

With regard to older libxml versions: it seems very reasonable to
test with these. I'll see if I can build the mentionend versions
of libxml2 on Windows (some preliminary tests were successful).

[1] <https://github.com/cmb69/php-src/tree/sxe-var-dump>

------------------------------------------------------------------------
[2015-05-26 15:59:25] ab@php.net

Hi Christoph,

thanks for following on this. I don't have all the details in my head, however you go into the
same direction. Whether the check you've found works better only the tests can decide, i'd
say. If it is - so lets take it.

One note though. The trickiness of this ticket is - we deal not only with PHP itself actually, but
with the behavior change in libxml and the previous fix might have been not 100% sufficient. 

IMHO what should be done - we should ensure that this fix doesn't break things when PHP is
linked with 2.7.x to 2.9.x. Probably the easiest done on Linux when fetching particular libxml
version, installing into some prefix and compiling PHP with it.

Are you in the mood to do this? If it's ok under say PHP-5.5 and libxml 2.7.7 2.7.8 2.8.0 2.9.1
2.9.2 - then please create a PR with all the aggregated tests from the tickets you've found
related and ping me so i'll test it as well. Does it sound eligible to you?

Thanks.

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


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

    https://bugs.php.net/bug.php?id=66084


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


Thread (23 messages)

« previous php.bugs (#192911) next »