# xml ext and &amp; entities

- Thread: https://externals.io/message/61868
- Original archive: https://news-web.php.net/php.internals/61868
- Started by Stas Malyshev on 2012-07-30T07:13:17+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #61868 — Stas Malyshev — 2012-07-30T07:13:17+00:00

URL: https://externals.io/message/61868#61868

Hi!

I was running PHP tests on my freshly installed CentOS instance and I
noticed that two XML tests were failing: ext/xml/tests/bug35447.phpt and
ext/xml/tests/xml011.phpt. Looks like for some reason XML parser when
parsing something like this: This &amp; that - produces empty string
instead of "&" when parsing &amp;.
Any idea why it could be happening? libxml2 is of version 2.7.8 and in
general it's standard CentOS 6.3, 64-bit.  Does not reproduce on Mac
with same PHP and same libxml2 version.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #61902 — Pierre Joye — 2012-08-01T05:46:02+00:00

URL: https://externals.io/message/61868#61902 · In reply to: #61868

hi!


> Hi!
>
> I was running PHP tests on my freshly installed CentOS instance and I
> noticed that two XML tests were failing: ext/xml/tests/bug35447.phpt and
> ext/xml/tests/xml011.phpt. Looks like for some reason XML parser when
> parsing something like this: This &amp; that - produces empty string
> instead of "&" when parsing &amp;.
> Any idea why it could be happening? libxml2 is of version 2.7.8 and in
> general it's standard CentOS 6.3, 64-bit.  Does not reproduce on Mac
> with same PHP and same libxml2 version.

Can you try using a stock version of libxml or using the latest version?

I met some issues in the past on Centos because of bad patches applied
to libxml.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #61990 — Stas Malyshev — 2012-08-03T05:07:13+00:00

URL: https://externals.io/message/61868#61990 · In reply to: #61902

Hi!

> Can you try using a stock version of libxml or using the latest version?
> 
> I met some issues in the past on Centos because of bad patches applied
> to libxml.

I've built both 2.7.8 and 2.8.0 from source - same result. &amp; is
ignored when parsing with PHP xml extension.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #62113 — Pierre Joye — 2012-08-10T11:03:31+00:00

URL: https://externals.io/message/61868#62113 · In reply to: #61868

Hi Rob,

Does that ring a bell?


> Hi!
>
> I was running PHP tests on my freshly installed CentOS instance and I
> noticed that two XML tests were failing: ext/xml/tests/bug35447.phpt and
> ext/xml/tests/xml011.phpt. Looks like for some reason XML parser when
> parsing something like this: This &amp; that - produces empty string
> instead of "&" when parsing &amp;.
> Any idea why it could be happening? libxml2 is of version 2.7.8 and in
> general it's standard CentOS 6.3, 64-bit.  Does not reproduce on Mac
> with same PHP and same libxml2 version.
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
> --
> 
> 
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #62114 — Rob Richards — 2012-08-10T12:50:20+00:00

URL: https://externals.io/message/61868#62114 · In reply to: #62113

The only time I saw this was when PHP was built against libxml 
2.7.0-2.7.2 as there were some breaking changes in those versions with 
entities and SAX. I'll snag a copy of 6.3 and see if I can reproduce.

Rob


> Hi Rob,
>
> Does that ring a bell?
>
> 
> > […]
