Ticket #15263 (closed defect: fixed)
php5: dyld confused about multiple installed libxml2 versions
| Reported by: | bkw@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.6.0 |
| Keywords: | php5, libxml2, dyld | Cc: | ryandesign@…, jwa@… |
| Port: |
Description
this might be a similar issue like #14063.
Recent libxml2 versions have much improved schema validation functionality over the one shipped with leopard does. But Dyld seems to think they are interchangable, based on the compatibilty version 9.0.0. I upgraded everything from macports (apache2, libxml2, php5) but still see the old library at work. Validating an xml file against a schema gives the following error message:
Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Unimplemented block at /SourceCache/libxml2/libxml2-17.7.6/libxml2/pattern.c:851 in [...]/tests/xmllib2.php on line 10 Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Unimplemented block at /SourceCache/libxml2/libxml2-17.7.6/libxml2/pattern.c:851 in [...]/tests/xmllib2.php on line 10 Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaIDCAddStateObject, failed to create an XPath validation context. in [...]/tests/xmllib2.php on line 10 Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaValidateElem, calling xmlSchemaValidateElemDecl(). in [...]/tests/xmllib2.php on line 10 Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaDocWalk, calling xmlSchemaValidateElem(). in [...]/tests/xmllib2.php on line 10
Note the mention of libxml2-17.7.6, I have 2.6.63 installed, which phpinfo() also cofirms. I don't even have a /SourceCache directory!
Also the httpd backend crashes with a malloc error (non-aligned pointer beeing freed).
During my investigaion I cooked all kinds of php versions on my own, experimenting with all kinds of ld-options like -force_flat_namespace, but always had similar results. phpinfo() pretends to use version 2.6.32 from /opt/local/lib, but in reality leopard's version from /usr/lib is beeing used. One Combination (iirc it was with suhoshin and xdebug linked in) produced a crash-reporter dump, that actually showed both versions of libxml2 in memory.
php code to reproduce this problem is as easy as:
$dom = new DOMDocument;
$dom->load('somefile.xml');
$dom->schemaValidate('someschema.xsd');
Please mail me if you need more details, i can reproduce this all to easily.

