16658678 problem in UTILITY/PHP s11u1-sru
authorCraig Mohrman <craig.mohrman@oracle.com>
Wed, 29 Jan 2014 18:57:31 -0800
branchs11u1-sru
changeset 2926 73b93bcb8a2c
parent 2920 46fc9c05a65b
child 2927 262a25d50d74
16658678 problem in UTILITY/PHP 16004918 problem in UTILITY/PHP 16098069 /etc/apache2/2.2/conf.d/php/php.conf missing on upgrade to s11.1 17026033 problem in UTILITY/PHP 17157091 problem in UTILITY/PHP 18156529 upgrade php 5.3 to 5.3.27
components/apache2/apache-22.p5m
components/php-5_2/php-sapi/patches/13_php_libxml_2_9_0.patch
components/php-5_2/php-sapi/patches/14_php_16658678.patch
components/php-5_2/php-sapi/patches/15_php_16004918.patch
components/php-5_2/php-sapi/patches/16_php_openssl_tests.patch
components/php-5_2/php-sapi/patches/17_php_17026033.patch
components/php-5_2/php-sapi/patches/18_php_17157091.patch
components/php-5_3/Makefile
components/php-5_3/apache-php53.license
components/php-5_3/apache-php53.p5m
components/php-5_3/php-53.license
components/php-5_3/php-53.p5m
components/php-5_3/php-apc.p5m
components/php-5_3/php-cgi/Makefile
components/php-5_3/php-doc.license
components/php-5_3/php-doc.p5m
components/php-5_3/php-idn.p5m
components/php-5_3/php-memcache.p5m
components/php-5_3/php-mysql.license
components/php-5_3/php-mysql.p5m
components/php-5_3/php-nsapi/Makefile
components/php-5_3/php-pear.license
components/php-5_3/php-pear.p5m
components/php-5_3/php-sapi/Makefile
components/php-5_3/php-sapi/patches/091_php_pdo_stmt_race.patch
components/php-5_3/php-sapi/patches/111_php_run-tests.php.patch
components/php-5_3/php-suhosin.p5m
components/php-5_3/php-tcpwrap.p5m
components/php-5_3/php-xdebug.p5m
components/php-common/Makefile
components/php-common/php.license
--- a/components/apache2/apache-22.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/apache2/apache-22.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -666,3 +666,10 @@
 depend fmri=__TBD \
     pkg.debug.depend.file=usr/apr-util/1.3/lib/apr-util-1/apr_ldap-1.so \
     type=require 
+
+depend type=conditional \
+       predicate=web/php-52 \
+       fmri=web/server/apache-22/module/[email protected]
+depend type=conditional \
+       predicate=web/php-53 \
+       fmri=web/server/apache-22/module/[email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/13_php_libxml_2_9_0.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,58 @@
+Update to work with libxml 2.9.0 
+
+https://github.com/php/php-src/commit/c4b26cc1b0b0521c75e653fffec2a9e3b4bf8cbb
+
+diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
+index d61ba79..eee3b5f 100644
+--- a/ext/dom/documenttype.c
++++ b/ext/dom/documenttype.c
[email protected]@ -205,7 +205,11 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
+ 		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;
+ 		}
+diff --git a/ext/dom/node.c b/ext/dom/node.c
+index 5bcb234..727d1bc 100644
+--- a/ext/dom/node.c
++++ b/ext/dom/node.c
[email protected]@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
+         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();
+ 			}
+diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
+index a379111..2368596 100644
+--- a/ext/simplexml/simplexml.c
++++ b/ext/simplexml/simplexml.c
[email protected]@ -1387,7 +1387,11 @@ static int sxe_objects_compare(zval *object1, zval *object2 TSRMLS_DC) /* {{{ */
+ 
+ 			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 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/14_php_16658678.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,201 @@
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=cc4c318b0c71e1a9c9cf803b5ee5d437344d64db
+Check if soap.wsdl_cache_dir confirms to open_basedir
+
+--- php-5.2.17/ext/soap/soap.c_orig	2010-06-09 08:48:22.000000000 -0700
++++ php-5.2.17/ext/soap/soap.c	2013-06-05 14:11:41.182400088 -0700
[email protected]@ -416,10 +416,44 @@
+ 	return SUCCESS;
+ }
+ 
++static PHP_INI_MH(OnUpdateCacheDir)
++{
++	/* Only do the safemode/open_basedir check at runtime */
++	if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) {
++		char *p;
++
++		if (memchr(new_value, '\0', new_value_length) != NULL) {
++			return FAILURE;
++		}
++
++		/* we do not use zend_memrchr() since path can contain ; itself */
++		if ((p = strchr(new_value, ';'))) {
++			char *p2;
++			p++;
++			if ((p2 = strchr(p, ';'))) {
++				p = p2 + 1;
++			}
++		} else {
++			p = new_value;
++		}
++
++		if (PG(safe_mode) && *p && (!php_checkuid(p, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
++			return FAILURE;
++		}
++
++		if (PG(open_basedir) && *p && php_check_open_basedir(p TSRMLS_CC)) {
++			return FAILURE;
++		}
++	}
++
++	OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
++	return SUCCESS;
++}
++
+ PHP_INI_BEGIN()
+ STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled",     "1", PHP_INI_ALL, OnUpdateCacheEnabled,
+                   cache_enabled, zend_soap_globals, soap_globals)
+-STD_PHP_INI_ENTRY("soap.wsdl_cache_dir",         "/tmp", PHP_INI_ALL, OnUpdateString,
++STD_PHP_INI_ENTRY("soap.wsdl_cache_dir",         "/tmp", PHP_INI_ALL, OnUpdateCacheDir,
+                   cache_dir, zend_soap_globals, soap_globals)
+ STD_PHP_INI_ENTRY("soap.wsdl_cache_ttl",         "86400", PHP_INI_ALL, OnUpdateLong,
+                   cache_ttl, zend_soap_globals, soap_globals)
+
+
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=8e76d0404b7f664ee6719fd98f0483f0ac4669d6
+Fixed external entity loading
+http://git.php.net/?p=php-src.git;a=commitdiff;h=fcd4b5335a6df4e0676ee32e2267ca71d70fe623
+Fix TSRM (after afc1debb)
+
+--- php-5.2.17/ext/libxml/libxml.c_orig	2010-01-03 01:23:27.000000000 -0800
++++ php-5.2.17/ext/libxml/libxml.c	2013-06-05 14:18:21.153940829 -0700
[email protected]@ -267,6 +267,7 @@
+ 	libxml_globals->stream_context = NULL;
+ 	libxml_globals->error_buffer.c = NULL;
+ 	libxml_globals->error_list = NULL;
++	libxml_globals->entity_loader_disabled = 0;
+ }
+ 
+ /* Channel libxml file io layer through the PHP streams subsystem.
[email protected]@ -356,16 +357,15 @@
+ }
+ 
+ static xmlParserInputBufferPtr
+-php_libxml_input_buffer_noload(const char *URI, xmlCharEncoding enc)
+-{
+-	return NULL;
+-}
+-
+-static xmlParserInputBufferPtr
+ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
+ {
+ 	xmlParserInputBufferPtr ret;
+ 	void *context = NULL;
++	TSRMLS_FETCH();
++
++	if (LIBXML(entity_loader_disabled)) {
++		return NULL;
++	}
+ 
+ 	if (URI == NULL)
+ 		return(NULL);
[email protected]@ -839,28 +839,25 @@
+ }
+ /* }}} */
+ 
++PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable TSRMLS_DC)
++{
++	zend_bool old = LIBXML(entity_loader_disabled);
++
++	LIBXML(entity_loader_disabled) = disable;
++	return old;
++}
++
+ /* {{{ proto bool libxml_disable_entity_loader([boolean disable]) 
+    Disable/Enable ability to load external entities */
+ static PHP_FUNCTION(libxml_disable_entity_loader)
+ {
+ 	zend_bool disable = 1;
+-	xmlParserInputBufferCreateFilenameFunc old;
+ 
+ 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &disable) == FAILURE) {
+ 		return;
+ 	}
+ 
+-	if (disable == 0) {
+-		old = xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename);
+-	} else {
+-		old = xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_noload);
+-	}
+-
+-	if (old == php_libxml_input_buffer_noload) {
+-		RETURN_TRUE;
+-	}
+-
+-	RETURN_FALSE;
++	RETURN_BOOL(php_libxml_disable_entity_loader(disable TSRMLS_CC));
+ }
+ /* }}} */
+ 
+--- php-5.2.17/ext/libxml/php_libxml.h_orig	2010-01-03 01:23:27.000000000 -0800
++++ php-5.2.17/ext/libxml/php_libxml.h	2013-06-05 14:20:23.311490825 -0700
[email protected]@ -41,6 +41,7 @@
+ 	zval *stream_context;
+ 	smart_str error_buffer;
+ 	zend_llist *error_list;
++	zend_bool entity_loader_disabled;
+ ZEND_END_MODULE_GLOBALS(libxml)
+ 
+ typedef struct _libxml_doc_props {
[email protected]@ -91,6 +92,7 @@
+ PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s);
+ PHP_LIBXML_API zval *php_libxml_switch_context(zval *context TSRMLS_DC);
+ PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg TSRMLS_DC);
++PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable TSRMLS_DC);
+ 
+ /* Init/shutdown functions*/
+ PHP_LIBXML_API void php_libxml_initialize(void);
+--- php-5.2.17/ext/soap/php_xml.c_orig	2010-01-03 01:23:27.000000000 -0800
++++ php-5.2.17/ext/soap/php_xml.c	2013-06-05 14:28:21.292038266 -0700
[email protected]@ -20,6 +20,7 @@
+ /* $Id: php_xml.c 293036 2010-01-03 09:23:27Z sebastian $ */
+ 
+ #include "php_soap.h"
++#include "ext/libxml/php_libxml.h"
+ #include "libxml/parser.h"
+ #include "libxml/parserInternals.h"
+ 
[email protected]@ -91,13 +92,17 @@
+ 	ctxt = xmlCreateFileParserCtxt(filename);
+ 	PG(allow_url_fopen) = old_allow_url_fopen;
+ 	if (ctxt) {
++		zend_bool old;
++
+ 		ctxt->keepBlanks = 0;
+ 		ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
+ 		ctxt->sax->comment = soap_Comment;
+ 		ctxt->sax->warning = NULL;
+ 		ctxt->sax->error = NULL;
+ 		/*ctxt->sax->fatalError = NULL;*/
++		old = php_libxml_disable_entity_loader(1 TSRMLS_CC);
+ 		xmlParseDocument(ctxt);
++		php_libxml_disable_entity_loader(old TSRMLS_CC);
+ 		if (ctxt->wellFormed) {
+ 			ret = ctxt->myDoc;
+ 			if (ret->URL == NULL && ctxt->directory != NULL) {
[email protected]@ -128,11 +133,14 @@
+ 	xmlParserCtxtPtr ctxt = NULL;
+ 	xmlDocPtr ret;
+ 
++	TSRMLS_FETCH();
+ /*
+ 	xmlInitParser();
+ */
+ 	ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
+ 	if (ctxt) {
++		zend_bool old;
++
+ 		ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
+ 		ctxt->sax->comment = soap_Comment;
+ 		ctxt->sax->warning = NULL;
[email protected]@ -141,7 +149,9 @@
+ #if LIBXML_VERSION >= 20703
+ 		ctxt->options |= XML_PARSE_HUGE;
+ #endif
++		old = php_libxml_disable_entity_loader(1 TSRMLS_CC);
+ 		xmlParseDocument(ctxt);
++		php_libxml_disable_entity_loader(old TSRMLS_CC);
+ 		if (ctxt->wellFormed) {
+ 			ret = ctxt->myDoc;
+ 			if (ret->URL == NULL && ctxt->directory != NULL) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/15_php_16004918.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,89 @@
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=fc74503792b1ee92e4b813690890f3ed38fa3ad5
+improve overflow checks
+
+--- php-5.2.17/main/streams/streams.c_orig	2010-01-06 04:54:53.000000000 -0800
++++ php-5.2.17/main/streams/streams.c	2013-07-09 10:14:05.583023604 -0700
[email protected]@ -2083,8 +2083,8 @@
+ 	php_stream *stream;
+ 	php_stream_dirent sdp;
+ 	char **vector = NULL;
+-	int vector_size = 0;
+-	int nfiles = 0;
++	unsigned int vector_size = 0;
++	unsigned int nfiles = 0;
+ 
+ 	if (!namelist) {
+ 		return FAILURE;
[email protected]@ -2100,9 +2100,14 @@
+ 			if (vector_size == 0) {
+ 				vector_size = 10;
+ 			} else {
++				if(vector_size*2 < vector_size) {
++					/* overflow */
++					efree(vector);
++					return FAILURE;
++				}
+ 				vector_size *= 2;
+ 			}
+-			vector = (char **) erealloc(vector, vector_size * sizeof(char *));
++			vector = (char **) safe_erealloc(vector, vector_size, sizeof(char *), 0);
+ 		}
+ 
+ 		vector[nfiles] = estrdup(sdp.d_name);
+
+
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=055ecbc62878e86287d742c7246c21606cee8183
+Improve check for :memory: pseudo-filename in SQlite
+php5.2 doesn't have sqlite3 so apply fix to sqlite.
+ 
+--- php-5.2.17/ext/pdo_sqlite/sqlite_driver.c_orig	2010-06-20 07:12:06.000000000 -0700
++++ php-5.2.17/ext/pdo_sqlite/sqlite_driver.c	2013-06-10 10:28:40.178224391 -0700
[email protected]@ -642,7 +642,7 @@
+ 
+ static char *make_filename_safe(const char *filename TSRMLS_DC)
+ {
+-	if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) {
++	if (*filename && memcmp(filename, ":memory:", sizeof(":memory:"))) {
+ 		char *fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ 
+ 		if (!fullpath) {
+--- php-5.2.17/ext/sqlite/sqlite.c_orig	2010-04-28 05:10:10.000000000 -0700
++++ php-5.2.17/ext/sqlite/sqlite.c	2013-06-10 11:08:25.397573242 -0700
[email protected]@ -747,7 +747,7 @@
+ 			return SQLITE_OK;
+ #ifdef SQLITE_ATTACH
+ 		case SQLITE_ATTACH:
+-			if (strncmp(arg3, ":memory:", sizeof(":memory:") - 1)) {
++			if (memcmp(arg3, ":memory:", sizeof(":memory:"))) {
+ 				TSRMLS_FETCH();
+ 				if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+ 					return SQLITE_DENY;
[email protected]@ -1230,7 +1230,7 @@
+ 		ZVAL_NULL(errmsg);
+ 	}
+ 
+-	if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
++	if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+ 		/* resolve the fully-qualified path name to use as the hash key */
+ 		if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ 			RETURN_FALSE;
[email protected]@ -1306,7 +1306,7 @@
+ 		ZVAL_NULL(errmsg);
+ 	}
+ 
+-	if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
++	if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+ 		/* resolve the fully-qualified path name to use as the hash key */
+ 		if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ 			php_std_error_handling();
[email protected]@ -1358,7 +1358,7 @@
+ 		ZVAL_NULL(errmsg);
+ 	}
+ 
+-	if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
++	if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+ 		/* resolve the fully-qualified path name to use as the hash key */
+ 		if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ 			php_std_error_handling();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/16_php_openssl_tests.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,14 @@
+This test now causing an infinite loop.
+Produced fix by comparing to the php 5.3.26 version of the test.
+
+--- php-5.2.17/ext/openssl/tests/bug48182.phpt_orig	2009-09-22 03:15:10.000000000 -0700
++++ php-5.2.17/ext/openssl/tests/bug48182.phpt	2013-06-20 14:16:39.947981967 -0700
[email protected]@ -51,7 +51,7 @@
+ 	$socket = stream_socket_client($host, $errno, $errstr, 10, $flags);
+ 	stream_set_blocking($socket, 0);
+ 
+-	while ($data) {
++	while ($socket && $data) {
+ 		$wrote = fwrite($socket, $data, strlen($data));
+ 		$data = substr($data, $wrote);
+ 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/17_php_17026033.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,54 @@
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=4828f7343b3f31d914f4d4a5545865b8a19f7fb6
+Integer overflow in SndToJewish leads to php hang
+and
+http://git.php.net/?p=php-src.git;a=commitdiff;h=c50cef1dc54ffd1d0fb71d1afb8b2c3cb3c5b6ef
+Fixed bug #64895 Integer overflow in SndToJewish
+
+CVE-2013-2110 - use correct formula to calculate string size
+does NOT apply because no such function to patch.
+
+--- php-5.2.17/ext/calendar/jewish.c_orig	2003-03-22 17:44:58.000000000 -0800
++++ php-5.2.17/ext/calendar/jewish.c	2013-07-01 15:33:18.280118195 -0700
[email protected]@ -272,6 +272,7 @@
+ #define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7))
+ 
+ #define JEWISH_SDN_OFFSET 347997
++#define JEWISH_SDN_MAX 324542846L /* 12/13/887605, greater value raises interger overflow */
+ #define NEW_MOON_OF_CREATION 31524
+ 
+ #define SUNDAY    0
[email protected]@ -519,7 +520,7 @@
+ 	int tishri1After;
+ 	int yearLength;
+ 
+-	if (sdn <= JEWISH_SDN_OFFSET) {
++	if (sdn <= JEWISH_SDN_OFFSET || sdn > JEWISH_SDN_MAX) {
+ 		*pYear = 0;
+ 		*pMonth = 0;
+ 		*pDay = 0;
+
+
+--- php-5.2.17/ext/calendar/tests/jdtojewish64.phpt_orig	2013-07-01 15:41:34.918645609 -0700
++++ php-5.2.17/ext/calendar/tests/jdtojewish64.phpt	2013-07-01 15:37:34.054921308 -0700
[email protected]@ -0,0 +1,19 @@
++--TEST--
++Bug #64895: Integer overflow in SndToJewish
++--SKIPIF--
++<?php 
++include 'skipif.inc';
++if (PHP_INT_SIZE == 4) {
++        die("skip this test is for 64bit platform only");
++}
++?>
++--FILE--
++<?php
++$a = array(38245310, 324542846, 324542847, 9223372036854743639);
++
++foreach ($a as $x) var_dump(jdtojewish($x));
++--EXPECTF--
++string(11) "2/22/103759"
++string(12) "12/13/887605"
++string(5) "0/0/0"
++string(5) "0/0/0"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/php-5_2/php-sapi/patches/18_php_17157091.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -0,0 +1,137 @@
+From
+http://git.php.net/?p=php-src.git;a=commitdiff;h=7d163e8a0880ae8af2dd869071393e5dc07ef271
+truncate results at depth of 255 to prevent corruption
+
+--- php-5.2.17/ext/xml/xml.c_orig	2010-11-03 07:18:28.000000000 -0700
++++ php-5.2.17/ext/xml/xml.c	2013-07-12 08:31:01.397237583 -0700
[email protected]@ -322,7 +322,7 @@
+ 	}
+ 	if (parser->ltags) {
+ 		int inx;
+-		for (inx = 0; inx < parser->level; inx++)
++		for (inx = 0; ((inx < parser->level) && (inx < XML_MAXLEVEL)); inx++)
+ 			efree(parser->ltags[ inx ]);
+ 		efree(parser->ltags);
+ 	}
[email protected]@ -800,45 +800,50 @@
+ 		} 
+ 
+ 		if (parser->data) {
+-			zval *tag, *atr;
+-			int atcnt = 0;
++			if (parser->level <= XML_MAXLEVEL)  {
++				zval *tag, *atr;
++				int atcnt = 0;
+ 
+-			MAKE_STD_ZVAL(tag);
+-			MAKE_STD_ZVAL(atr);
++				MAKE_STD_ZVAL(tag);
++				MAKE_STD_ZVAL(atr);
+ 
+-			array_init(tag);
+-			array_init(atr);
++				array_init(tag);
++				array_init(atr);
+ 
+-			_xml_add_to_info(parser,((char *) tag_name) + parser->toffset);
++				_xml_add_to_info(parser,((char *) tag_name) + parser->toffset);
+ 
+-			add_assoc_string(tag,"tag",((char *) tag_name) + parser->toffset,1); /* cast to avoid gcc-warning */
+-			add_assoc_string(tag,"type","open",1);
+-			add_assoc_long(tag,"level",parser->level);
++				add_assoc_string(tag,"tag",((char *) tag_name) + parser->toffset,1); /* cast to avoid gcc-warning */
++				add_assoc_string(tag,"type","open",1);
++				add_assoc_long(tag,"level",parser->level);
+ 
+-			parser->ltags[parser->level-1] = estrdup(tag_name);
+-			parser->lastwasopen = 1;
++				parser->ltags[parser->level-1] = estrdup(tag_name);
++				parser->lastwasopen = 1;
+ 
+-			attributes = (const XML_Char **) attrs;
++				attributes = (const XML_Char **) attrs;
+ 
+-			while (attributes && *attributes) {
+-				att = _xml_decode_tag(parser, attributes[0]);
+-				val = xml_utf8_decode(attributes[1], strlen(attributes[1]), &val_len, parser->target_encoding);
+-				
+-				add_assoc_stringl(atr,att,val,val_len,0);
++				while (attributes && *attributes) {
++					att = _xml_decode_tag(parser, attributes[0]);
++					val = xml_utf8_decode(attributes[1], strlen(attributes[1]), &val_len, parser->target_encoding);
+ 
+-				atcnt++;
+-				attributes += 2;
++					add_assoc_stringl(atr,att,val,val_len,0);
+ 
+-				efree(att);
+-			}
++					atcnt++;
++					attributes += 2;
+ 
+-			if (atcnt) {
+-				zend_hash_add(Z_ARRVAL_P(tag),"attributes",sizeof("attributes"),&atr,sizeof(zval*),NULL);
+-			} else {
+-				zval_ptr_dtor(&atr);
+-			}
++					efree(att);
++				}
++
++				if (atcnt) {
++					zend_hash_add(Z_ARRVAL_P(tag),"attributes",sizeof("attributes"),&atr,sizeof(zval*),NULL);
++				} else {
++					zval_ptr_dtor(&atr);
++				}
+ 
+-			zend_hash_next_index_insert(Z_ARRVAL_P(parser->data),&tag,sizeof(zval*),(void *) &parser->ctag);
++				zend_hash_next_index_insert(Z_ARRVAL_P(parser->data),&tag,sizeof(zval*),(void *) &parser->ctag);
++			} else if (parser->level == (XML_MAXLEVEL + 1)) {
++				TSRMLS_FETCH();
++				php_error_docref(NULL TSRMLS_CC, E_WARNING, "Maximum depth exceeded - Results truncated");
++			}
+ 		}
+ 
+ 		efree(tag_name);
[email protected]@ -890,7 +895,7 @@
+ 
+ 		efree(tag_name);
+ 
+-		if (parser->ltags) {
++		if ((parser->ltags) && (parser->level <= XML_MAXLEVEL)) {
+ 			efree(parser->ltags[parser->level-1]);
+ 		}
+ 
[email protected]@ -974,18 +979,23 @@
+ 						}
+ 					}
+ 
+-					MAKE_STD_ZVAL(tag);
+-					
+-					array_init(tag);
+-					
+-					_xml_add_to_info(parser,parser->ltags[parser->level-1] + parser->toffset);
++					if (parser->level <= XML_MAXLEVEL) {
++						MAKE_STD_ZVAL(tag);
+ 
+-					add_assoc_string(tag,"tag",parser->ltags[parser->level-1] + parser->toffset,1);
+-					add_assoc_string(tag,"value",decoded_value,0);
+-					add_assoc_string(tag,"type","cdata",1);
+-					add_assoc_long(tag,"level",parser->level);
++						array_init(tag);
+ 
+-					zend_hash_next_index_insert(Z_ARRVAL_P(parser->data),&tag,sizeof(zval*),NULL);
++						_xml_add_to_info(parser,parser->ltags[parser->level-1] + parser->toffset);
++
++						add_assoc_string(tag,"tag",parser->ltags[parser->level-1] + parser->toffset,1);
++						add_assoc_string(tag,"value",decoded_value,0);
++						add_assoc_string(tag,"type","cdata",1);
++						add_assoc_long(tag,"level",parser->level);
++
++						zend_hash_next_index_insert(Z_ARRVAL_P(parser->data),&tag,sizeof(zval*),NULL);
++					} else if (parser->level == (XML_MAXLEVEL + 1)) {
++						TSRMLS_FETCH();
++						php_error_docref(NULL TSRMLS_CC, E_WARNING, "Maximum depth exceeded - Results truncated");
++					}
+ 				}
+ 			} else {
+ 				efree(decoded_value);
--- a/components/php-5_3/Makefile	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/Makefile	Wed Jan 29 18:57:31 2014 -0800
@@ -114,7 +114,10 @@
 #			[paths already correct and some things don't exist.]
 #               looks like i DO NEED the pear patches
 
+COMPONENT_NAME=		php
+COMPONENT_VERSION=	5.3.27
 COMPONENT_PROJECT_URL=	http://www.php.net/
+COMPONENT_BUGDB=	utility/php
 
 PKG_PROTO_DIRS += APC/build/prototype/$(MACH)
 PKG_PROTO_DIRS += APC-zts/build/prototype/$(MACH)
--- a/components/php-5_3/apache-php53.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/apache-php53.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 --------------
-- php 5.3.10 -
+- php 5.3.27 -
 --------------
 
 Oracle elects to use only the GNU Lesser General Public License version
--- a/components/php-5_3/apache-php53.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/apache-php53.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,13 +18,13 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/web/server/apache-22/module/[email protected],$(BUILD_VERSION)
+set name=pkg.fmri value=pkg:/web/server/apache-22/module/[email protected],$(BUILD_VERSION)
 set name=pkg.summary value="PHP Server for Apache Web Server"
 set name=info.classification value="org.opensolaris.category.2008:Web Services/Application and Web Servers"
-set name=info.source-url value=http://us.php.net/get/php-5.3.14.tar.gz/from/this/mirror
+set name=info.source-url value=http://us.php.net/get/php-5.3.27.tar.gz/from/this/mirror
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid value=PSARC/2012/067
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
@@ -46,7 +46,7 @@
 file path=usr/apache2/2.2/libexec/mod_php5.3.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
 
 # if php5.2 apache is present drag forward because php.conf files
 # move around
--- a/components/php-5_3/php-53.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-53.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 --------------
-- php 5.3.10 -
+- php 5.3.27 -
 --------------
 
 Oracle elects to use only the GNU Lesser General Public License version
--- a/components/php-5_3/php-53.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-53.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -26,7 +26,7 @@
 <transform file path=etc/php/.* -> default mode 0644>
 <transform file path=etc/php/.* -> default preserve renamenew>
 
-set name=pkg.fmri value=pkg:/web/[email protected],$(BUILD_VERSION)
+set name=pkg.fmri value=pkg:/web/[email protected],$(BUILD_VERSION)
 set name=pkg.description \
     value="A general-purpose scripting language originally designed for web development to produce dynamic web pages."
 set name=pkg.summary value="PHP Server"
@@ -34,7 +34,7 @@
     value="org.opensolaris.category.2008:Development/PHP"
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=info.source-url \
-    value=http://us.php.net/get/php-5.3.14.tar.bz2/from/this/mirror
+    value=http://us.php.net/get/php-5.3.27.tar.bz2/from/this/mirror
 set name=org.opensolaris.arc-caseid value=PSARC/2012/067
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 
@@ -459,20 +459,11 @@
 file path=usr/php/5.3/zts-modules/tidy.so
 link path=usr/php/5.3/bin/configure-webserver7 \
     target=../samples/scripts/configure-sun-webserver
-#
-# Once this is integrated and in the IPS repo we can remove
-# these pkg.linted.pkglint.dupaction
-#
-link path=usr/php/bin target=5.3/bin mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
-link path=usr/php/include target=5.3/include mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
-link path=usr/php/lib target=5.3/lib mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
-link path=usr/php/man target=5.3/man mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
-link path=usr/php/modules target=5.3/modules mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
+link path=usr/php/bin target=5.3/bin mediator=php mediator-version=5.3
+link path=usr/php/include target=5.3/include mediator=php mediator-version=5.3
+link path=usr/php/lib target=5.3/lib mediator=php mediator-version=5.3
+link path=usr/php/man target=5.3/man mediator=php mediator-version=5.3
+link path=usr/php/modules target=5.3/modules mediator=php mediator-version=5.3
 link path=usr/bin/php target=../php/5.3/bin/php \
     mediator=php mediator-version=5.3
 link path=usr/bin/php-config target=../php/5.3/bin/php-config \
--- a/components/php-5_3/php-apc.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-apc.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -58,4 +58,4 @@
 file path=usr/php/5.3/zts-modules/apc.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-cgi/Makefile	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-cgi/Makefile	Wed Jan 29 18:57:31 2014 -0800
@@ -18,16 +18,16 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		php
-COMPONENT_VERSION=	5.3.14
+COMPONENT_VERSION=	5.3.27
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH= \
-    sha256:c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3
+    sha256:e12db21c623b82a2244c4dd9b06bb75af20868c1b748a105a6829a5acc36b287
 COMPONENT_ARCHIVE_URL=	http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
 
 PATCH_DIR = ../php-sapi/patches
--- a/components/php-5_3/php-doc.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-doc.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 --------------
-- php 5.3.10 -
+- php 5.3.27 -
 --------------
 
 -------------------------------------------------------------------- 
--- a/components/php-5_3/php-doc.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-doc.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,10 +18,10 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/web/php-53/[email protected],$(BUILD_VERSION)
+set name=pkg.fmri value=pkg:/web/php-53/[email protected],$(BUILD_VERSION)
 set name=pkg.summary value="PHP Server Documentation"
 set name=info.classification \
     value="org.opensolaris.category.2008:Development/PHP"
@@ -38,10 +38,7 @@
 dir path=usr/php/5.3/doc
 dir path=usr/php/5.3/doc/php-chunked-xhtml
 dir path=usr/php/5.3/doc/php-chunked-xhtml/images
-# Once this is integrated and in the IPS repo we can remove
-# these pkg.linted.pkglint.dupaction
-link path=usr/php/doc target=5.3/doc mediator=php mediator-version=5.3 \
-    pkg.linted.pkglint.dupaction010.2=true
+link path=usr/php/doc target=5.3/doc mediator=php mediator-version=5.3
 file path=usr/php/5.3/doc/php-chunked-xhtml/about.formats.html
 file path=usr/php/5.3/doc/php-chunked-xhtml/about.generate.html
 file path=usr/php/5.3/doc/php-chunked-xhtml/about.howtohelp.html
--- a/components/php-5_3/php-idn.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-idn.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -48,4 +48,4 @@
 file path=usr/php/5.3/zts-modules/idn.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-memcache.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-memcache.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -57,4 +57,4 @@
 file path=usr/php/5.3/zts-modules/memcache.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-mysql.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-mysql.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 --------------------
-- php-mysql 5.3.10 -
+- php-mysql 5.3.27 -
 --------------------
 
 Oracle elects to use only the GNU Lesser General Public License version
--- a/components/php-5_3/php-mysql.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-mysql.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,15 +18,15 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
+set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
 set name=pkg.summary value="MySQL extension module for PHP"
 set name=info.classification \
     value="org.opensolaris.category.2008:Development/PHP"
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=info.source-url value=http://us.php.net/get/php-5.3.14.tar.gz/from/this/mirror
+set name=info.source-url value=http://us.php.net/get/php-5.3.27.tar.gz/from/this/mirror
 set name=org.opensolaris.arc-caseid value=PSARC/2012/067
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 
@@ -56,4 +56,4 @@
 file path=usr/php/5.3/zts-modules/pdo_mysql.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-nsapi/Makefile	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-nsapi/Makefile	Wed Jan 29 18:57:31 2014 -0800
@@ -18,17 +18,17 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		php
-COMPONENT_VERSION=	5.3.14
+COMPONENT_VERSION=	5.3.27
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH= \
-    sha256:c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3
+    sha256:e12db21c623b82a2244c4dd9b06bb75af20868c1b748a105a6829a5acc36b287
 COMPONENT_ARCHIVE_URL=	http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
 COMPONENT_PROJECT_URL=	http://www.php.net/
 
--- a/components/php-5_3/php-pear.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-pear.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 -------------------
-- php-pear 5.3.10 -
+- php-pear 5.3.27 -
 -------------------
 
 Oracle elects to use only the GNU Lesser General Public License version
--- a/components/php-5_3/php-pear.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-pear.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 # All the files under /var/php are mode=0644
@@ -26,13 +26,13 @@
 <transform file path=var/php/.* -> default group bin>
 <transform file path=var/php/.* -> default preserve renamenew>
 
-set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
+set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
 set name=pkg.description \
     value="Framework and reusable PHP components from PEAR repository for PHP"
 set name=pkg.summary value="PHP Extension and Application Repository"
 set name=info.classification \
     value="org.opensolaris.category.2008:Development/PHP"
-set name=info.source-url value=http://us.php.net/get/php-5.3.14.tar.gz/from/this/mirror
+set name=info.source-url value=http://us.php.net/get/php-5.3.27.tar.gz/from/this/mirror
 set name=info.upstream-url value=http://pear.php.net/
 set name=org.opensolaris.arc-caseid value=PSARC/2012/067
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
@@ -301,4 +301,4 @@
 file path=var/php/5.3/pear/test/XML_Util/tests/testBug_5392.phpt
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-sapi/Makefile	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-sapi/Makefile	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../../make-rules/shared-macros.mk
 
@@ -29,11 +29,11 @@
 #    published from.
 
 COMPONENT_NAME=		php
-COMPONENT_VERSION=	5.3.14
+COMPONENT_VERSION=	5.3.27
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH= \
-    sha256:c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3
+    sha256:e12db21c623b82a2244c4dd9b06bb75af20868c1b748a105a6829a5acc36b287
 COMPONENT_ARCHIVE_URL=	http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
 COMPONENT_PROJECT_URL=	http://www.php.net/
 
--- a/components/php-5_3/php-sapi/patches/091_php_pdo_stmt_race.patch	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-sapi/patches/091_php_pdo_stmt_race.patch	Wed Jan 29 18:57:31 2014 -0800
@@ -1,3 +1,14 @@
+6911348 back port pdo race bug for opensolaris
+6909525 PDO race condition fix for multithreaded php
+which states:
+There is a race condition in pdo which was found when running olio inside Sun Web Server (nsapi).
+http://bugs.php.net/bug.php?id=49937&thanks=1
+
+Fix has been submitted but because of lack of reviewer it has not been committed into php tree.
+
+We need to carry this patch until it is merged.
+
+
 --- php-5.3.10/ext/pdo/pdo_stmt.c_orig	Sun Jan  1 05:15:04 2012
 +++ php-5.3.10/ext/pdo/pdo_stmt.c	Wed Feb  8 11:25:26 2012
 @@ -2322,6 +2322,51 @@
@@ -65,7 +76,7 @@
  	stmt->refcount = 1;
  	ALLOC_HASHTABLE(stmt->properties);
  	zend_hash_init(stmt->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
--	zend_hash_copy(stmt->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+-	zend_hash_copy(stmt->properties, &ce->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
 +	init_stmt_properties(stmt TSRMLS_CC);
  
  	retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, (zend_objects_store_clone_t)dbstmt_clone_obj TSRMLS_CC);
--- a/components/php-5_3/php-sapi/patches/111_php_run-tests.php.patch	Wed Jan 29 00:54:26 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
---- php-5.3.10/run-tests.php_orig	Mon Dec  5 21:44:54 2011
-+++ php-5.3.10/run-tests.php	Wed Feb  8 11:25:26 2012
[email protected]@ -1,4 +1,4 @@
--#!/usr/bin/php
-+#!/usr/php/5.3/bin/php
- <?php
- /*
-    +----------------------------------------------------------------------+
--- a/components/php-5_3/php-suhosin.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-suhosin.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -48,4 +48,4 @@
 file path=usr/php/5.3/zts-modules/suhosin.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-tcpwrap.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-tcpwrap.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -48,4 +48,4 @@
 file path=usr/php/5.3/zts-modules/tcpwrap.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-5_3/php-xdebug.p5m	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-xdebug.p5m	Wed Jan 29 18:57:31 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/web/php-53/extension/[email protected],$(BUILD_VERSION)
@@ -50,4 +50,4 @@
 file path=usr/php/5.3/zts-modules/xdebug.so
 
 # need generic dependency on PHP itself
-depend fmri=web/[email protected] type=require
+depend fmri=web/[email protected] type=require
--- a/components/php-common/Makefile	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-common/Makefile	Wed Jan 29 18:57:31 2014 -0800
@@ -18,11 +18,11 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
-COMPONENT_NAME=		php
+COMPONENT_NAME=		php-common
 # This version # based on the version # of Solaris
 COMPONENT_VERSION=	11.1
 COMPONENT_PROJECT_URL=	http://www.php.net/
--- a/components/php-common/php.license	Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-common/php.license	Wed Jan 29 18:57:31 2014 -0800
@@ -1,5 +1,5 @@
 --------------
-- php 5.3.10 -
+- php 5.3.27 -
 --------------
 
 Oracle elects to use only the GNU Lesser General Public License version