# php_compat.h XML clean up

- Thread: https://externals.io/message/24171
- Original archive: https://news-web.php.net/php.internals/24171
- Started by Brian J. France on 2006-06-21T17:19:14+00:00
- Messages: 1
- 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

---

## #24171 — Brian J. France — 2006-06-21T17:19:14+00:00

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

I think the xml stuff in php_compat.h needs some attention.

The gd defines need moved out side of the xml stuff and only things  
from expat_compat.h need compat'ed.

This patch is what I was thinking:

http://www.brianfrance.com/software/php/php_compat.h.patch

This also adds one that is used but not in there.

Comments?

This all came about because a property of ours is moving to PHP 5 and  
is using expat.  Turns out the only real solution for them is to  
either move to libxml2 or define PHP_COMPAT_H before include all the  
PHP headers.  If they don't define PHP_COMPAT_H before including the  
headers they will calling php_XML_ParserCreate to create a  
php_XML_Parser and then try to send that to  
XML_SetCdataSectionHandler (which isn't compat'ed) and things will go  
boom (in theory).

Brian
