BASH
Configurare email
Configurare software
Hardware
Linux
Linux Mint
Pentru tonti
Securitate
VMWARE
Windows
linux :: patch pentru php 5.3.15 sau mai mic cu libxml 2.9.0
CAMSCAPE SERVICES Cristian M. |
Title | Patch pentru PHP 5.3.15 sau mai mic cu LibXML 2.9.0 |
Tags | php, libxml, 2.9.0 | |
Desc. | Patch pentru PHP 5.3.15 sau mai mic cu LibXML 2.9.0 | |
Code | KBLN0001 v1.0 | |
Date | 16 septembrie 2012 |
/usr/local/src/php_sources/php-5.3.15/ext/dom/node.c: In function ‘dom_canonicalization’: /usr/local/src/php_sources/php-5.3.15/ext/dom/node.c:1898: error: dereferencing pointer to incomplete type /usr/local/src/php_sources/php-5.3.15/ext/dom/node.c:1900: error: dereferencing pointer to incomplete type make: *** [ext/dom/node.lo] Error 1
Rezolvarea este fie upgrade-ul la o noua versiune PHP, fie aplicarea urmatorului patch in PHP:
--- ext/dom/node.c.orig 2012-09-16 23:46:24.000000000 +0300 +++ ext/dom/node.c 2012-09-16 23:55:46.000000000 +0300 @@ -1895,9 +1895,17 @@ RETVAL_FALSE; } else { if (mode == 0) { +#ifdef LIBXML2_NEW_BUFFER + ret = xmlOutputBufferGetSize(buf); +#else ret = buf->buffer->use; +#endif if (ret > 0) { +#ifdef LIBXML2_NEW_BUFFER + RETVAL_STRINGL((char *) xmlOutputBufferGetContent(buf), ret, 1); +#else RETVAL_STRINGL((char *) buf->buffer->content, ret, 1); +#endif } else { RETVAL_EMPTY_STRING(); } --- ext/dom/documenttype.c.orig 2012-09-16 23:46:24.000000000 +0300 +++ ext/dom/documenttype.c 2012-09-16 23:52:04.000000000 +0300 @@ -205,7 +205,13 @@ if (buff != NULL) { xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL); xmlOutputBufferFlush(buff); + +#ifdef LIBXML2_NEW_BUFFER + ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff), 1); +#else ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1); +#endif + (void)xmlOutputBufferClose(buff); return SUCCESS; } --- ext/simplexml/simplexml.c.orig 2012-09-17 01:44:31.000000000 +0300 +++ ext/simplexml/simplexml.c 2012-09-16 23:57:38.000000000 +0300 @@ -1387,7 +1387,12 @@ xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding); xmlOutputBufferFlush(outbuf); +#ifdef LIBXML2_NEW_BUFFER + RETVAL_STRINGL((char *)xmlOutputBufferGetContent(outbuf), + xmlOutputBufferGetSize(outbuf), 1); +#else RETVAL_STRINGL((char *)outbuf->buffer->content, outbuf->buffer->use, 1); +#endif xmlOutputBufferClose(outbuf); } } else {