diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 2e75d697296..f4db619363a 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -40,6 +40,7 @@ #ifdef LIBXML_SCHEMAS_ENABLED #include #include +#include #endif #include "php_libxml.h" @@ -928,7 +929,14 @@ PHP_LIBXML_API void php_libxml_initialize(void) if (!php_libxml_initialized) { /* we should be the only one's to ever init!! */ ZEND_IGNORE_LEAKS_BEGIN(); + xmlInitParser(); +#ifdef LIBXML_SCHEMAS_ENABLED + xmlSchemaInitTypes(); +#endif +#ifdef LIBXML_RELAXNG_ENABLED + xmlRelaxNGInitTypes(); +#endif ZEND_IGNORE_LEAKS_END(); php_libxml_default_entity_loader = xmlGetExternalEntityLoader();