[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ configure.in

2009-11-30 Thread Gwynne Raskind
gwynne   Mon, 30 Nov 2009 08:17:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291477

Log:
once and for all remove the old broken Darwin hack, replace it with the new and 
much cleaner and simpler one

Changed paths:
U   php/php-src/branches/PHP_5_3/configure.in

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-11-30 07:53:46 UTC (rev 
291476)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-11-30 08:17:13 UTC (rev 
291477)
@@ -122,21 +122,6 @@
 $php_shtool mkdir -p libs
 rm -f libs/*

-dnl Darwin 9 hack
-dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
-dnl causes errors in all current and past versions of Autoconf, we do a little
-dnl messing with the CFLAGS here to trick it.
-php_did_darwin9_cheat=0
-case $host_alias in
-*darwin9*)
-  hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
-  if test x$hasg = x; then
-php_did_darwin9_cheat=1
-CFLAGS=$CFLAGS -gstabs
-  fi
-  ;;
-esac
-
 dnl Checks for programs.
 dnl -

@@ -1339,6 +1324,14 @@

 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS

+dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
+dnl This hack works around it. Ugly.
+case $host_alias in
+*darwin9*|*darwin10*)
+   ac_cv_exeext=
+   ;;
+esac
+
 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called 
(by PHP_REQUIRE_CXX).
 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
@@ -1362,15 +1355,6 @@

 CC=$old_CC

-dnl Finish the Darwin hack
-if test $php_did_darwin9_cheat -eq 1; then
-  if test $PHP_DEBUG = 1; then
-CFLAGS=`echo $CFLAGS | $SED -e 's/-gstabs/-g/g'`
-  else
-CFLAGS=`echo -O2 $CFLAGS | $SED -e 's/-gstabs//g'`
-  fi
-fi
-
 PHP_CONFIGURE_PART(Generating files)

 CXXFLAGS_CLEAN=$CXXFLAGS

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ configure.in

2009-11-30 Thread Gwynne Raskind
gwynne   Mon, 30 Nov 2009 08:18:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291478

Log:
re-committing: unsetting LIBS and LDFLAGS just makes it impossible to specify 
LDFLAGS from the environment. keeping them doesn't seem to cause any trouble

Changed paths:
U   php/php-src/branches/PHP_5_3/configure.in

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-11-30 08:17:13 UTC (rev 
291477)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-11-30 08:18:44 UTC (rev 
291478)
@@ -988,7 +988,7 @@
   EXTRA_LIBS=-lcrypt $EXTRA_LIBS -lcrypt
 fi

-unset LIBS LDFLAGS
+#unset LIBS LDFLAGS

 dnl PEAR
 dnl -
@@ -1071,7 +1071,7 @@
 fi

 ZEND_EXTRA_LIBS=$LIBS
-unset LIBS LDFLAGS
+#unset LIBS LDFLAGS

 PHP_HELP_SEPARATOR([TSRM:])
 PHP_CONFIGURE_PART(Configuring TSRM)
@@ -1083,7 +1083,7 @@
 EXTRA_LDFLAGS=$EXTRA_LDFLAGS $LDFLAGS
 EXTRA_LDFLAGS_PROGRAM=$EXTRA_LDFLAGS_PROGRAM $LDFLAGS
 EXTRA_LIBS=$EXTRA_LIBS $LIBS
-unset LIBS LDFLAGS
+#unset LIBS LDFLAGS

 test $prefix = NONE  prefix=/usr/local
 test $exec_prefix = NONE  exec_prefix='${prefix}'

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ configure.in

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 08:31:32 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291479

Log:
- Revert bad patch

Changed paths:
U   php/php-src/branches/PHP_5_3/configure.in

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-11-30 08:18:44 UTC (rev 
291478)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-11-30 08:31:32 UTC (rev 
291479)
@@ -988,7 +988,7 @@
   EXTRA_LIBS=-lcrypt $EXTRA_LIBS -lcrypt
 fi

-#unset LIBS LDFLAGS
+unset LIBS LDFLAGS

 dnl PEAR
 dnl -
@@ -1071,7 +1071,7 @@
 fi

 ZEND_EXTRA_LIBS=$LIBS
-#unset LIBS LDFLAGS
+unset LIBS LDFLAGS

 PHP_HELP_SEPARATOR([TSRM:])
 PHP_CONFIGURE_PART(Configuring TSRM)
@@ -1083,7 +1083,7 @@
 EXTRA_LDFLAGS=$EXTRA_LDFLAGS $LDFLAGS
 EXTRA_LDFLAGS_PROGRAM=$EXTRA_LDFLAGS_PROGRAM $LDFLAGS
 EXTRA_LIBS=$EXTRA_LIBS $LIBS
-#unset LIBS LDFLAGS
+unset LIBS LDFLAGS

 test $prefix = NONE  prefix=/usr/local
 test $exec_prefix = NONE  exec_prefix='${prefix}'

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/win32/build/ config.w32 confutils.js

2009-11-30 Thread Pierre Joye
pajoye   Mon, 30 Nov 2009 09:52:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291481

Log:
- MFH: vs2010 detection support, restore /W3

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/build/config.w32
U   php/php-src/branches/PHP_5_3/win32/build/confutils.js

Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32
===
--- php/php-src/branches/PHP_5_3/win32/build/config.w32 2009-11-30 09:22:41 UTC 
(rev 291480)
+++ php/php-src/branches/PHP_5_3/win32/build/config.w32 2009-11-30 09:52:33 UTC 
(rev 291481)
@@ -15,6 +15,7 @@
 // 1310 is vs.net 2003
 // 1400 is vs.net 2005
 // 1500 is vs.net 2008
+// 1600 is vs.net 2010
 // Which version of the compiler do we have?
 VCVERS = probe_binary(CL).substr(0, 5).replace('.', '');
 STDOUT.WriteLine(  Detected compiler  + VC_VERSIONS[VCVERS]);

Modified: php/php-src/branches/PHP_5_3/win32/build/confutils.js
===
--- php/php-src/branches/PHP_5_3/win32/build/confutils.js   2009-11-30 
09:22:41 UTC (rev 291480)
+++ php/php-src/branches/PHP_5_3/win32/build/confutils.js   2009-11-30 
09:52:33 UTC (rev 291481)
@@ -41,6 +41,7 @@
 VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
 VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
 VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
+VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)';

 var VC_VERSIONS_SHORT = new Array();
 VC_VERSIONS_SHORT[1200] = 'VC6';
@@ -48,6 +49,7 @@
 VC_VERSIONS_SHORT[1310] = 'VC7.1';
 VC_VERSIONS_SHORT[1400] = 'VC8';
 VC_VERSIONS_SHORT[1500] = 'VC9';
+VC_VERSIONS_SHORT[1600] = 'VC10';

 if (PROGRAM_FILES == null) {
PROGRAM_FILES = C:\\Program Files;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/win32/build/ config.w32

2009-11-30 Thread Pierre Joye
pajoye   Mon, 30 Nov 2009 09:52:48 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291482

Log:
- restore /W3

Changed paths:
U   php/php-src/trunk/win32/build/config.w32

Modified: php/php-src/trunk/win32/build/config.w32
===
--- php/php-src/trunk/win32/build/config.w322009-11-30 09:52:33 UTC (rev 
291481)
+++ php/php-src/trunk/win32/build/config.w322009-11-30 09:52:48 UTC (rev 
291482)
@@ -120,7 +120,7 @@

 // General CFLAGS for building objects
 DEFINE(CFLAGS, /nologo /FD $(BASE_INCLUDES) /D _WINDOWS \
-/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS);
+/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 );

 if (VCVERS  1400) {
// Enable automatic precompiled headers

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c branches/PHP_5_3/ext/mysqlnd/php_m

2009-11-30 Thread Pierre Joye
pajoye   Mon, 30 Nov 2009 10:56:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291483

Log:
- void is NaN, you can't do math ops on void. Declarations go first. Fix TS 
build

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2009-11-30 09:52:48 UTC 
(rev 291482)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2009-11-30 10:56:01 UTC 
(rev 291483)
@@ -2393,7 +2393,7 @@
if (!conn || plugin_id = mysqlnd_plugin_count()) {
return NULL;
}
-   DBG_RETURN((void *)conn + sizeof(MYSQLND) + plugin_id * sizeof(void *));
+   DBG_RETURN((void *)(conn + sizeof(MYSQLND) + plugin_id * sizeof(void 
*)));
 }
 /* }}} */


Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-11-30 
09:52:48 UTC (rev 291482)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2009-11-30 
10:56:01 UTC (rev 291483)
@@ -2073,7 +2073,7 @@
if (!result || plugin_id = mysqlnd_plugin_count()) {
return NULL;
}
-   DBG_RETURN((void *)result + sizeof(MYSQLND_RES) + plugin_id * 
sizeof(void *));
+   DBG_RETURN((void *)(result + sizeof(MYSQLND_RES) + plugin_id * 
sizeof(void *)));
 }
 /* }}} */


Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c 
2009-11-30 09:52:48 UTC (rev 291482)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c 
2009-11-30 10:56:01 UTC (rev 291483)
@@ -1307,8 +1307,8 @@
 static
 void php_mysqlnd_rset_header_free_mem(void *_packet, zend_bool alloca 
TSRMLS_DC)
 {
+   php_mysql_packet_rset_header *p= (php_mysql_packet_rset_header *) 
_packet;
DBG_ENTER(php_mysqlnd_rset_header_free_mem);
-   php_mysql_packet_rset_header *p= (php_mysql_packet_rset_header *) 
_packet;
if (p-info_or_local_file) {
mnd_efree(p-info_or_local_file);
p-info_or_local_file = NULL;

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c  2009-11-30 
09:52:48 UTC (rev 291482)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c  2009-11-30 
10:56:01 UTC (rev 291483)
@@ -45,14 +45,14 @@

zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), pos_values);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values),
-   
(void **)values_entry, pos_values) == SUCCESS) {
-   TSRMLS_FETCH();
+   (void **)values_entry, pos_values) == SUCCESS) {
zstrstring_key;
uintstring_key_len;
ulong   num_key;
int s_len;
char*s = NULL;

+   TSRMLS_FETCH();
zend_hash_get_current_key_ex(Z_ARRVAL_P(values), string_key, 
string_key_len, num_key, 0, pos_values);

convert_to_string(*values_entry);

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2009-11-30 09:52:48 UTC (rev 
291482)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2009-11-30 10:56:01 UTC (rev 
291483)
@@ -2393,7 +2393,7 @@
if (!conn || plugin_id = mysqlnd_plugin_count()) {
return NULL;
}
-   DBG_RETURN((void *)conn + sizeof(MYSQLND) + plugin_id * sizeof(void *));
+   DBG_RETURN((void *)(conn + sizeof(MYSQLND) + plugin_id * sizeof(void 
*)));
 }
 /* }}} */


Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2009-11-30 09:52:48 UTC 
(rev 291482)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2009-11-30 10:56:01 UTC 
(rev 291483)
@@ -2073,7 +2073,7 @@
if (!result || plugin_id = mysqlnd_plugin_count()) {
return NULL;
}
-   DBG_RETURN((void *)result + sizeof(MYSQLND_RES) + plugin_id * 
sizeof(void *));
+ 

[PHP-CVS] svn: /SVNROOT/ pear_avail

2009-11-30 Thread Ken Guest
kguest   Mon, 30 Nov 2009 11:05:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291485

Log:
grant kornel access to HTML_Template_PHPTAL

Changed paths:
U   SVNROOT/pear_avail

Modified: SVNROOT/pear_avail
===
--- SVNROOT/pear_avail  2009-11-30 11:00:09 UTC (rev 291484)
+++ SVNROOT/pear_avail  2009-11-30 11:05:44 UTC (rev 291485)
@@ -183,6 +183,7 @@
 avail|izi|pear/packages/Services_ReCaptcha
 avail|isaac|pear/packages/MDB2_TableBrowser
 avail|denny|pear/packages/Text_PathNavigator
+avail|kornel|pear/packages/HTML_Template_PHPTAL

 # But members of the PHP Group get access to everything.
 # Note: This line MUST be at the end so that it overrides any unavail settings

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c

2009-11-30 Thread Dmitry Stogov
dmitry   Mon, 30 Nov 2009 11:39:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291488

Log:
Fixed bug #50261 (Crash When Calling Parent Constructor with call_user_func())

Bug: http://bugs.php.net/50261 (Assigned) Crash When Calling Parent Constructor 
with call_user_func()
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
U   php/php-src/trunk/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-11-30 11:18:00 UTC (rev 291487)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-11-30 11:39:53 UTC (rev 291488)
@@ -30,6 +30,8 @@
   calling function). (Felipe)
 - Fixed bug #50267 (get_browser(null) does not use HTTP_USER_AGENT). (Jani)
 - Fixed bug #50266 (conflicting types for llabs). (Jani)
+- Fixed bug #50261 (Crash When Calling Parent Constructor with
+  call_user_func()). (Dmitry)
 - Fixed bug #50255 (isset() and empty() silently casts array to object).
   (Felipe)
 - Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used

Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_API.c	2009-11-30 11:18:00 UTC (rev 291487)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c	2009-11-30 11:39:53 UTC (rev 291488)
@@ -2117,7 +2117,7 @@
 #if HAVE_LIBDL
 #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
 	if (module-handle) {
-		DL_UNLOAD(module-handle);
+//		DL_UNLOAD(module-handle);
 	}
 #endif
 #endif
@@ -2335,12 +2335,13 @@
 }
 /* }}} */

-static int zend_is_callable_check_class(const char *name, int name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */
+static int zend_is_callable_check_class(const char *name, int name_len, zend_fcall_info_cache *fcc, int *strict_class, char **error TSRMLS_DC) /* {{{ */
 {
 	int ret = 0;
 	zend_class_entry **pce;
 	char *lcname = zend_str_tolower_dup(name, name_len);

+	*strict_class = 0;
 	if (name_len == sizeof(self) - 1 
 	!memcmp(lcname, self, sizeof(self) - 1)) {
 		if (!EG(scope)) {
@@ -2365,6 +2366,7 @@
 			if (!fcc-object_ptr) {
 fcc-object_ptr = EG(This);
 			}
+			*strict_class = 1;
 			ret = 1;
 		}
 	} else if (name_len == sizeof(static) - 1 
@@ -2377,6 +2379,7 @@
 			if (!fcc-object_ptr) {
 fcc-object_ptr = EG(This);
 			}
+			*strict_class = 1;
 			ret = 1;
 		}
 	} else if (zend_lookup_class_ex(name, name_len, 1, pce TSRMLS_CC) == SUCCESS) {
@@ -2391,6 +2394,7 @@
 		} else {
 			fcc-called_scope = fcc-object_ptr ? Z_OBJCE_P(fcc-object_ptr) : fcc-calling_scope;
 		}
+		*strict_class = 1;
 		ret = 1;
 	} else {
 		if (error) zend_spprintf(error, 0, class '%.*s' not found, name_len, name);
@@ -2401,7 +2405,7 @@
 /* }}} */


-static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */
+static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, int strict_class, char **error TSRMLS_DC) /* {{{ */
 {
 	zend_class_entry *ce_org = fcc-calling_scope;
 	int retval = 0;
@@ -2459,7 +2463,7 @@
 			EG(scope) = ce_org;
 		}

-		if (!zend_is_callable_check_class(Z_STRVAL_P(callable), clen, fcc, error TSRMLS_CC)) {
+		if (!zend_is_callable_check_class(Z_STRVAL_P(callable), clen, fcc, strict_class, error TSRMLS_CC)) {
 			EG(scope) = last_scope;
 			return 0;
 		}
@@ -2486,7 +2490,15 @@
 	}

 	lmname = zend_str_tolower_dup(mname, mlen);
-	if (zend_hash_find(ftable, lmname, mlen+1, (void**)fcc-function_handler) == SUCCESS) {
+	if (strict_class 
+	fcc-calling_scope 
+	mlen == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1 
+	!memcmp(lmname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME))) {
+		fcc-function_handler = fcc-calling_scope-constructor;
+		if (fcc-function_handler) {
+			retval = 1;
+		}
+	} else if (zend_hash_find(ftable, lmname, mlen+1, (void**)fcc-function_handler) == SUCCESS) {
 		retval = 1;
 		if ((fcc-function_handler-op_array.fn_flags  ZEND_ACC_CHANGED) 
 		EG(scope) 
@@ -2520,11 +2532,36 @@
 	} else {
 get_function_via_handler:
 		if (fcc-object_ptr  fcc-calling_scope == ce_org) {
-			if (Z_OBJ_HT_P(fcc-object_ptr)-get_method) {
+			if (strict_class  ce_org-__call) {
+fcc-function_handler = emalloc(sizeof(zend_internal_function));
+fcc-function_handler-internal_function.type = ZEND_INTERNAL_FUNCTION;
+fcc-function_handler-internal_function.module = ce_org-module;
+fcc-function_handler-internal_function.handler = zend_std_call_user_call;
+fcc-function_handler-internal_function.arg_info = NULL;
+fcc-function_handler-internal_function.num_args = 0;
+fcc-function_handler-internal_function.scope = ce_org;
+fcc-function_handler-internal_function.fn_flags = ZEND_ACC_CALL_VIA_HANDLER;
+

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c

2009-11-30 Thread Antony Dovgal
It doesn't look like you meant to commit this:

--- php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 11:18:00 UTC 
(rev 291487)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 11:39:53 UTC 
(rev 291488)
@@ -2117,7 +2117,7 @@
 #if HAVE_LIBDL
 #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
if (module-handle) {
-   DL_UNLOAD(module-handle);
+// DL_UNLOAD(module-handle);
}
 #endif
 #endif



On 30.11.2009 14:39, Dmitry Stogov wrote:
 dmitry   Mon, 30 Nov 2009 11:39:53 +
 
 Revision: http://svn.php.net/viewvc?view=revisionrevision=291488
 
 Log:
 Fixed bug #50261 (Crash When Calling Parent Constructor with call_user_func())
 
 Bug: http://bugs.php.net/50261 (Assigned) Crash When Calling Parent 
 Constructor with call_user_func()
   
 Changed paths:
 U   php/php-src/branches/PHP_5_3/NEWS
 U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
 U   php/php-src/trunk/Zend/zend_API.c
 
 


-- 
Wbr, 
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ zend_API.c

2009-11-30 Thread Dmitry Stogov
dmitry   Mon, 30 Nov 2009 12:27:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291491

Log:
Reverted accidental change

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 12:22:00 UTC 
(rev 291490)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 12:27:18 UTC 
(rev 291491)
@@ -2117,7 +2117,7 @@
 #if HAVE_LIBDL
 #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
if (module-handle) {
-// DL_UNLOAD(module-handle);
+   DL_UNLOAD(module-handle);
}
 #endif
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c

2009-11-30 Thread Dmitry Stogov


Antony Dovgal wrote:

It doesn't look like you meant to commit this:


You are right.

Thanks. Dmitry.


--- php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 11:18:00 UTC 
(rev 291487)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2009-11-30 11:39:53 UTC 
(rev 291488)
@@ -2117,7 +2117,7 @@
 #if HAVE_LIBDL
 #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
if (module-handle) {
-   DL_UNLOAD(module-handle);
+// DL_UNLOAD(module-handle);
}
 #endif
 #endif



On 30.11.2009 14:39, Dmitry Stogov wrote:

dmitry   Mon, 30 Nov 2009 11:39:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291488

Log:
Fixed bug #50261 (Crash When Calling Parent Constructor with call_user_func())

Bug: http://bugs.php.net/50261 (Assigned) Crash When Calling Parent Constructor 
with call_user_func()
  
Changed paths:

U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
U   php/php-src/trunk/Zend/zend_API.c







--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/openssl/ openssl.c tests/sni_001.phpt xp_ssl.c

2009-11-30 Thread Arnaud Le Blanc
lbarnaud Mon, 30 Nov 2009 13:31:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291493

Log:
merge from trunk: openssl sni support (rev 289831)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
A + php/php-src/branches/PHP_5_3/ext/openssl/tests/sni_001.phpt
(from php/php-src/trunk/ext/openssl/tests/sni_001.phpt:r289831)
U   php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c

Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c
===
--- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c	2009-11-30 12:46:24 UTC (rev 291492)
+++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c	2009-11-30 13:31:53 UTC (rev 291493)
@@ -1041,6 +1041,11 @@
 	REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_EC, OPENSSL_KEYTYPE_EC, CONST_CS|CONST_PERSISTENT);
 #endif

+#if OPENSSL_VERSION_NUMBER = 0x0090806fL  !defined(OPENSSL_NO_TLSEXT)
+	/* SNI support included in OpenSSL = 0.9.8j */
+	REGISTER_LONG_CONSTANT(OPENSSL_TLSEXT_SERVER_NAME, 1, CONST_CS|CONST_PERSISTENT);
+#endif
+
 	/* Determine default SSL configuration file */
 	config_filename = getenv(OPENSSL_CONF);
 	if (config_filename == NULL) {

Copied: php/php-src/branches/PHP_5_3/ext/openssl/tests/sni_001.phpt (from rev 289831, php/php-src/trunk/ext/openssl/tests/sni_001.phpt)
===
--- php/php-src/branches/PHP_5_3/ext/openssl/tests/sni_001.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/openssl/tests/sni_001.phpt	2009-11-30 13:31:53 UTC (rev 291493)
@@ -0,0 +1,178 @@
+--TEST--
+SNI 001
+--SKIPIF--
+?php
+	if (!extension_loaded('openssl')) die(skip openssl extension not available);
+	if (!getenv('SNI_TESTS')) die(skip Set SNI_TESTS to enable this test (uses remote resources));
+?
+--FILE--
+?php
+/* Server Name Indication (SNI) tests
+ *
+ * This test relies on https://sni.velox.ch/ and thus is disabled by default.
+ *
+ * sni.velox.ch uses 3 certificates :
+ * - CN=alice.sni.velox.ch (sent in response to server_name = alice.sni.velox.ch or not set)
+ * - CN=bob.sni.velox.ch (sent in response to server_name = bob.sni.velox.ch)
+ * - CN=*.sni.velox.ch (sent in response to server_name = mallory.sni.velox.ch or *.sni.velox.ch or sni.velox.ch)
+ *
+ * The test sends requests to the server, sending different names, and checks which certificate
+ * the server returned.
+ */
+
+function context() {
+	return stream_context_create(array(
+		'ssl' = array(
+			'capture_peer_cert' = true,
+		),
+	));
+}
+
+function get_CN($context) {
+
+	$ary = stream_context_get_options($context);
+	assert($ary);
+
+	$cert = $ary['ssl']['peer_certificate'];
+	assert($cert);
+
+	$cert_ary = openssl_x509_parse($cert);
+	return $cert_ary['subject']['CN'];
+}
+
+function do_http_test($url, $context) {
+
+	$fh = fopen($url, 'r', false, $context);
+	assert($fh);
+
+	var_dump(get_CN($context));
+}
+
+function do_ssl_test($url, $context) {
+
+	$fh = stream_socket_client($url, $errno, $errstr,
+			ini_get(default_socket_timeout), STREAM_CLIENT_CONNECT, $context);
+	assert($fh);
+
+	var_dump(get_CN($context));
+}
+
+function do_enable_crypto_test($url, $context) {
+
+	$fh = stream_socket_client($url, $errno, $errstr,
+		ini_get(default_socket_timeout), STREAM_CLIENT_CONNECT, $context);
+	assert($fh);
+
+	$r = stream_socket_enable_crypto($fh, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+	assert($r);
+
+	var_dump(get_CN($context));
+}
+
+/* Test https:// streams */
+
+echo -- auto host name (1) --\n;
+do_http_test('https://alice.sni.velox.ch/', context());
+
+echo -- auto host name (2) --\n;
+do_http_test('https://bob.sni.velox.ch/', context());
+
+echo -- auto host name (3) --\n;
+do_http_test('https://bob.sni.velox.ch./', context());
+
+echo -- user supplied server name --\n;
+
+$context = context();
+stream_context_set_option($context, 'ssl', 'SNI_server_name', 'bob.sni.velox.ch');
+stream_context_set_option($context, 'http', 'header', b'Host: bob.sni.velox.ch');
+do_http_test('https://alice.sni.velox.ch/', $context);
+
+echo -- sni disabled --\n;
+
+$context = context();
+stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
+do_http_test('https://bob.sni.velox.ch/', $context);
+
+/* Test ssl:// socket streams */
+
+echo -- raw SSL stream (1) --\n;
+do_ssl_test('ssl://bob.sni.velox.ch:443', context());
+
+echo -- raw SSL stream (2) --\n;
+do_ssl_test('ssl://mallory.sni.velox.ch:443', context());
+
+echo -- raw SSL stream with user supplied sni --\n;
+
+$context = context();
+stream_context_set_option($context, 'ssl', 'SNI_server_name', 'bob.sni.velox.ch');
+
+do_ssl_test('ssl://mallory.sni.velox.ch:443', $context);
+
+echo -- raw SSL stream with sni disabled --\n;
+
+$context = context();
+stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
+
+do_ssl_test('ssl://mallory.sni.velox.ch:443', $context);
+
+/* Test tcp:// socket streams with SSL enabled 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ configure.in

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 14:08:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291494

Log:
- Restore configure.in before the madness started

Changed paths:
U   php/php-src/branches/PHP_5_3/configure.in

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-11-30 13:31:53 UTC (rev 
291493)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-11-30 14:08:33 UTC (rev 
291494)
@@ -122,6 +122,21 @@
 $php_shtool mkdir -p libs
 rm -f libs/*

+dnl Darwin 9 hack
+dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
+dnl causes errors in all current and past versions of Autoconf, we do a little
+dnl messing with the CFLAGS here to trick it.
+php_did_darwin9_cheat=0
+case $host_alias in
+*darwin9*)
+  hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
+  if test x$hasg = x; then
+php_did_darwin9_cheat=1
+CFLAGS=$CFLAGS -gstabs
+  fi
+  ;;
+esac
+
 dnl Checks for programs.
 dnl -

@@ -1324,14 +1339,6 @@

 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS

-dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
-dnl This hack works around it. Ugly.
-case $host_alias in
-*darwin9*|*darwin10*)
-   ac_cv_exeext=
-   ;;
-esac
-
 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called 
(by PHP_REQUIRE_CXX).
 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
@@ -1355,6 +1362,15 @@

 CC=$old_CC

+dnl Finish the Darwin hack
+if test $php_did_darwin9_cheat -eq 1; then
+  if test $PHP_DEBUG = 1; then
+CFLAGS=`echo $CFLAGS | $SED -e 's/-gstabs/-g/g'`
+  else
+CFLAGS=`echo -O2 $CFLAGS | $SED -e 's/-gstabs//g'`
+  fi
+fi
+
 PHP_CONFIGURE_PART(Generating files)

 CXXFLAGS_CLEAN=$CXXFLAGS

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ configure.in

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 14:10:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291495

Log:
MF53: sync

Changed paths:
U   php/php-src/branches/PHP_5_2/configure.in

Modified: php/php-src/branches/PHP_5_2/configure.in
===
--- php/php-src/branches/PHP_5_2/configure.in   2009-11-30 14:08:33 UTC (rev 
291494)
+++ php/php-src/branches/PHP_5_2/configure.in   2009-11-30 14:10:11 UTC (rev 
291495)
@@ -192,6 +192,7 @@
 if test $SUNCC = yes; then
   CFLAGS=$CFLAGS -xmemalign=8s
 fi
+;;
 esac

 case $host_alias in
@@ -745,15 +746,6 @@
   dnl Add the special gcc flags
   CFLAGS=$CFLAGS -O0 -fprofile-arcs -ftest-coverage
   CXXFLAGS=$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage
-  if test $SUNCC = yes; then
-if test -n $auto_cflags; then
-  CFLAGS=-g
-  CXXFLAGS=-g
-else
-  CFLAGS=$CFLAGS -g
-  CXXFLAGS=$CFLAGS -g
-fi
-  fi
 fi

 PHP_ARG_ENABLE(debug, whether to include debugging symbols,
@@ -768,9 +760,18 @@
   changequote([,])
   dnl add -O0 only if GCC or ICC is used
   if test $GCC = yes || test $ICC = yes; then
-CFLAGS=$CFLAGS -O0
-CXXFLAGS=$CXXFLAGS -O0
+CFLAGS=$CFLAGS -g -O0
+CXXFLAGS=$CXXFLAGS -g -O0
   fi
+  if test $SUNCC = yes; then
+if test -n $auto_cflags; then
+  CFLAGS=-g
+  CXXFLAGS=-g
+else
+  CFLAGS=$CFLAGS -g
+  CXXFLAGS=$CFLAGS -g
+fi
+  fi
 else
   PHP_DEBUG=0
   ZEND_DEBUG=no

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/fopen_wrappers.c trunk/main/fopen_wrappers.c

2009-11-30 Thread Dmitry Stogov
dmitry   Mon, 30 Nov 2009 14:21:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291496

Log:
Fixed bug #50159 (wrong working directory in symlinked files)

Bug: http://bugs.php.net/50159 (Assigned) wrong working directory in symlinked 
files
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/fopen_wrappers.c
U   php/php-src/trunk/main/fopen_wrappers.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-11-30 14:10:11 UTC (rev 291495)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-11-30 14:21:23 UTC (rev 291496)
@@ -46,6 +46,7 @@
 - Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
   when there is no error). (Jani)
 - Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
+- Fixed bug #50159 (wrong working directory in symlinked files). (Dmitry)
 - Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
   containing = or ?). (Pierrick)
 - Fixed bug #50152 (ReflectionClass::hasProperty behaves like isset() not

Modified: php/php-src/branches/PHP_5_3/main/fopen_wrappers.c
===
--- php/php-src/branches/PHP_5_3/main/fopen_wrappers.c	2009-11-30 14:10:11 UTC (rev 291495)
+++ php/php-src/branches/PHP_5_3/main/fopen_wrappers.c	2009-11-30 14:21:23 UTC (rev 291496)
@@ -386,16 +386,16 @@
 #ifndef PHP_WIN32
 	struct stat st;
 #endif
-	char *path_info, *filename;
+	char *path_info;
+	char *filename = NULL;
+	char *resolved_path = NULL;
 	int length;

-	filename = SG(request_info).path_translated;
 	path_info = SG(request_info).request_uri;
 #if HAVE_PWD_H
 	if (PG(user_dir)  *PG(user_dir)  path_info  '/' == path_info[0]  '~' == path_info[1]) {
 		char *s = strchr(path_info + 2, '/');

-		filename = NULL;	/* discard the original filename, it must not be used */
 		if (s) {			/* if there is no path name after the file, do not bother */
 			char user[32];			/* to try open the directory */
 			struct passwd *pw;
@@ -426,39 +426,41 @@
 #endif
 			if (pw  pw-pw_dir) {
 spprintf(filename, 0, %s%c%s%c%s, pw-pw_dir, PHP_DIR_SEPARATOR, PG(user_dir), PHP_DIR_SEPARATOR, s + 1); /* Safe */
-STR_FREE(SG(request_info).path_translated);
-SG(request_info).path_translated = filename;
-			}
+			} else {
+filename = SG(request_info).path_translated;
+			}
 #if defined(ZTS)  defined(HAVE_GETPWNAM_R)  defined(_SC_GETPW_R_SIZE_MAX)
 			efree(pwbuf);
 #endif
 		}
 	} else
 #endif
-	if (PG(doc_root)  path_info) {
-		length = strlen(PG(doc_root));
-		if (IS_ABSOLUTE_PATH(PG(doc_root), length)) {
-			filename = emalloc(length + strlen(path_info) + 2);
-			if (filename) {
-memcpy(filename, PG(doc_root), length);
-if (!IS_SLASH(filename[length - 1])) {	/* length is never 0 */
-	filename[length++] = PHP_DIR_SEPARATOR;
-}
-if (IS_SLASH(path_info[0])) {
-	length--;
-}
-strcpy(filename + length, path_info);
-STR_FREE(SG(request_info).path_translated);
-SG(request_info).path_translated = filename;
+	if (PG(doc_root)  path_info  (length = strlen(PG(doc_root)) 
+		IS_ABSOLUTE_PATH(PG(doc_root), length))) {
+		filename = emalloc(length + strlen(path_info) + 2);
+		if (filename) {
+			memcpy(filename, PG(doc_root), length);
+			if (!IS_SLASH(filename[length - 1])) {	/* length is never 0 */
+filename[length++] = PHP_DIR_SEPARATOR;
 			}
+			if (IS_SLASH(path_info[0])) {
+length--;
+			}
+			strcpy(filename + length, path_info);
 		}
-	} /* if doc_root  path_info */
+	} else {
+		filename = SG(request_info).path_translated;
+	}

+
 	if (filename) {
-		filename = zend_resolve_path(filename, strlen(filename) TSRMLS_CC);
+		resolved_path = zend_resolve_path(filename, strlen(filename) TSRMLS_CC);
 	}

-	if (!filename) {
+	if (!resolved_path) {
+		if (SG(request_info).path_translated != filename) {
+			STR_FREE(filename);
+		}
 		/* we have to free SG(request_info).path_translated here because
 		 * php_destroy_request_info assumes that it will get
 		 * freed when the include_names hash is emptied, but
@@ -467,7 +469,7 @@
 		SG(request_info).path_translated = NULL;
 		return FAILURE;
 	}
-	fp = VCWD_FOPEN(filename, rb);
+	fp = VCWD_FOPEN(resolved_path, rb);

 #ifndef PHP_WIN32
 	/* refuse to open anything that is not a regular file */
@@ -478,15 +480,20 @@
 #endif

 	if (!fp) {
+		if (SG(request_info).path_translated != filename) {
+			STR_FREE(filename);
+		}
 		STR_FREE(SG(request_info).path_translated);	/* for same reason as above */
 		SG(request_info).path_translated = NULL;
 		return FAILURE;
 	}

-	file_handle-opened_path = expand_filepath(filename, NULL TSRMLS_CC);
+	file_handle-opened_path = resolved_path;

-	STR_FREE(SG(request_info).path_translated);	/* for same reason as above */
-	SG(request_info).path_translated = filename;
+	if (SG(request_info).path_translated != 

[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/NEWS PHP_5_2/sapi/cgi/cgi_main.c PHP_5_3/sapi/cgi/cgi_main.c

2009-11-30 Thread Dmitry Stogov
dmitry   Mon, 30 Nov 2009 14:43:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291497

Log:
Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to 
non-existant file)

Bug: http://bugs.php.net/50168 (Assigned) FastCGI fails with wrong error on 
HEAD request to non-existant file
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/sapi/cgi/cgi_main.c
U   php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-11-30 14:21:23 UTC (rev 291496)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-11-30 14:43:22 UTC (rev 291497)
@@ -2,6 +2,8 @@
 |||
 ?? Dec 2009, PHP 5.2.12RC4
 - Fixed bug #50266 (conflicting types for llabs). (Jani)
+- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
+  non-existant file). (Dmitry)


 27 Nov 2009, PHP 5.2.12RC3

Modified: php/php-src/branches/PHP_5_2/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_2/sapi/cgi/cgi_main.c2009-11-30 14:21:23 UTC 
(rev 291496)
+++ php/php-src/branches/PHP_5_2/sapi/cgi/cgi_main.c2009-11-30 14:43:22 UTC 
(rev 291497)
@@ -1496,8 +1496,9 @@
   in case some server does something different than 
above */
 (!CGIG(redirect_status_env) || 
!getenv(CGIG(redirect_status_env)))
) {
-   SG(sapi_headers).http_response_code = 400;
-   PUTS(bSecurity Alert!/b The PHP CGI cannot be 
accessed directly.\n\n\
+   zend_try {
+   SG(sapi_headers).http_response_code = 400;
+   PUTS(bSecurity Alert!/b The PHP CGI cannot 
be accessed directly.\n\n\
 pThis PHP CGI binary was compiled with force-cgi-redirect enabled.  This\n\
 means that a page will only be served up if the REDIRECT_STATUS CGI variable 
is\n\
 set, e.g. via an Apache Action directive./p\n\
@@ -1506,7 +1507,8 @@
 pFor more information about changing this behaviour or re-enabling this 
webserver,\n\
 consult the installation file that came with this distribution, or visit \n\
 a href=\http://php.net/install.windows\;the manual page/a./p\n);
-
+   } zend_catch {
+   } zend_end_try();
 #if defined(ZTS)  !defined(PHP_DEBUG)
/* XXX we're crashing here in msvc6 debug builds at
   php_message_handler_for_zend:839 because
@@ -1936,13 +1938,16 @@
running from shell (so fp == NULL), then fail.
*/
if (retval == FAILURE  file_handle.handle.fp == NULL) {
-   if (errno == EACCES) {
-   SG(sapi_headers).http_response_code = 403;
-   PUTS(Access denied.\n);
-   } else {
-   SG(sapi_headers).http_response_code = 404;
-   PUTS(No input file specified.\n);
-   }
+   zend_try {
+   if (errno == EACCES) {
+   SG(sapi_headers).http_response_code = 
403;
+   PUTS(Access denied.\n);
+   } else {
+   SG(sapi_headers).http_response_code = 
404;
+   PUTS(No input file specified.\n);
+   }
+   } zend_catch {
+   } zend_end_try();
 #if PHP_FASTCGI
/* we want to serve more requests if this is fastcgi
   so cleanup and continue, request shutdown is

Modified: php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-11-30 14:21:23 UTC 
(rev 291496)
+++ php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-11-30 14:43:22 UTC 
(rev 291497)
@@ -1634,8 +1634,9 @@
 * in case some server does something different than 
above */
(!CGIG(redirect_status_env) || 
!getenv(CGIG(redirect_status_env)))
) {
-   SG(sapi_headers).http_response_code = 400;
-   PUTS(bSecurity Alert!/b The PHP CGI cannot be 
accessed directly.\n\n\
+   zend_try {
+   SG(sapi_headers).http_response_code = 400;
+   PUTS(bSecurity Alert!/b The PHP CGI cannot 
be accessed directly.\n\n\
 pThis PHP CGI binary was compiled with 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysql/config.m4 branches/PHP_5_3/ext/pdo_mysql/config.m4 trunk/ext/mysql/config.m4 trunk/ext/pdo_mysql/config.m4

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 15:11:29 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291501

Log:
- Fixed bug #50231 (Socket path passed using --with-mysql-sock is ignored when 
mysqlnd is enabled)

Bug: http://bugs.php.net/50231 (Open) Socket path passed using 
--with-mysql-sock is ignored when mysqlnd is enabled
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/mysql/config.m4
U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/config.m4
U   php/php-src/trunk/ext/mysql/config.m4
U   php/php-src/trunk/ext/pdo_mysql/config.m4

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-11-30 15:07:41 UTC (rev 291500)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-11-30 15:11:29 UTC (rev 291501)
@@ -12,12 +12,10 @@
 - Added ReflectionMethod::setAccessible() for invoking non-public methods
   through the Reflection API. (Sebastian)
 - Added Collator::getSortKey for intl extension. (Stas)
-
-- Implemented FR #49571 (CURLOPT_POSTREDIR not implemented). (Sriram Natarajan)
-- Implemented FR #49253 (added support for libcurl's CERTINFO option).
+- Added support for CURLOPT_POSTREDIR. FR #49571. (Sriram Natarajan)
+- Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing li...@haxx.se)

-- Fixed the m4 scripts to support autoconf-2.64+. (Rasmus)
 - Fixed error_log() to be binary safe when using message_type 3. (Jani)
 - Fixed unnecessary invocation of setitimer when timeouts have been disabled.
   (Arvind Srinivasan)
@@ -36,6 +34,8 @@
   (Felipe)
 - Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used
   if it is empty). (foutrelis at gmail dot com, Ilia)
+- Fixed bug #50231 (Socket path passed using --with-mysql-sock is ignored when
+  mysqlnd is enabled). (Jani)
 - Fixed bug #50219 (soap call Segmentation fault on a redirected url).
   (Pierrick)
 - Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).

Modified: php/php-src/branches/PHP_5_3/ext/mysql/config.m4
===
--- php/php-src/branches/PHP_5_3/ext/mysql/config.m4	2009-11-30 15:07:41 UTC (rev 291500)
+++ php/php-src/branches/PHP_5_3/ext/mysql/config.m4	2009-11-30 15:11:29 UTC (rev 291501)
@@ -58,18 +58,6 @@
   PHP_MYSQLND_ENABLED=yes

 elif test $PHP_MYSQL != no; then
-
-  AC_MSG_CHECKING([for MySQL UNIX socket location])
-  if test $PHP_MYSQL_SOCK != no  test $PHP_MYSQL_SOCK != yes; then
-MYSQL_SOCK=$PHP_MYSQL_SOCK
-AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, $MYSQL_SOCK, [ ])
-AC_MSG_RESULT([$MYSQL_SOCK])
-  elif test $PHP_MYSQL = yes || test $PHP_MYSQL_SOCK = yes; then
-PHP_MYSQL_SOCKET_SEARCH
-  else
-AC_MSG_RESULT([no])
-  fi
-
   MYSQL_DIR=
   MYSQL_INC_DIR=

@@ -152,6 +140,17 @@

 dnl Enable extension
 if test $PHP_MYSQL != no; then
+  AC_MSG_CHECKING([for MySQL UNIX socket location])
+  if test $PHP_MYSQL_SOCK != no  test $PHP_MYSQL_SOCK != yes; then
+MYSQL_SOCK=$PHP_MYSQL_SOCK
+AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, $MYSQL_SOCK, [ ])
+AC_MSG_RESULT([$MYSQL_SOCK])
+  elif test $PHP_MYSQL = yes || test $PHP_MYSQL_SOCK = yes; then
+PHP_MYSQL_SOCKET_SEARCH
+  else
+AC_MSG_RESULT([no])
+  fi
+
   AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
   PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
   PHP_SUBST(MYSQL_SHARED_LIBADD)

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/config.m4
===
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/config.m4	2009-11-30 15:07:41 UTC (rev 291500)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/config.m4	2009-11-30 15:11:29 UTC (rev 291501)
@@ -28,46 +28,42 @@
 done
   ])

+  if test -f $PHP_PDO_MYSQL  test -x $PHP_PDO_MYSQL ; then
+PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
+  elif test $PHP_PDO_MYSQL != yes; then
+if test -d $PHP_PDO_MYSQL ; then
+  if test -x $PHP_PDO_MYSQL/bin/mysql_config ; then
+PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL/bin/mysql_config
+  else
+PDO_MYSQL_DIR=$PHP_PDO_MYSQL
+  fi
+fi
+  else
+for i in /usr/local /usr ; do
+  if test -x $i/bin/mysql_config ; then
+PDO_MYSQL_CONFIG=$i/bin/mysql_config
+break;
+  fi
+  if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
+PDO_MYSQL_DIR=$i
+break;
+  fi
+done
+  fi
+
   if test $PHP_PDO_MYSQL = mysqlnd; then
 dnl enables build of mysqnd library
 PHP_MYSQLND_ENABLED=yes
 AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])
   else
 AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
-AC_MSG_CHECKING([for mysql_config])

-if test -f $PHP_PDO_MYSQL  test -x $PHP_PDO_MYSQL ; then
-  PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
-elif test $PHP_PDO_MYSQL != yes; then
-  if test -d 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS

2009-11-30 Thread Ilia Alshanetsky
iliaaMon, 30 Nov 2009 15:22:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291503

Log:
bfn

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-11-30 15:16:50 UTC (rev 291502)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-11-30 15:22:01 UTC (rev 291503)
@@ -1,11 +1,12 @@
 PHPNEWS
 |||
 ?? Dec 2009, PHP 5.2.12RC4
+- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
+
 - Fixed bug #50266 (conflicting types for llabs). (Jani)
 - Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
   non-existant file). (Dmitry)

-
 27 Nov 2009, PHP 5.2.12RC3
 - Fixed break in the build chain introduced in 5.2.12RC2 (Jani)


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-11-30 Thread Arnaud Le Blanc
lbarnaud Mon, 30 Nov 2009 15:43:36 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291504

Log:
news

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-11-30 15:22:01 UTC (rev 291503)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-11-30 15:43:36 UTC (rev 291504)
@@ -15,6 +15,7 @@
 - Added support for CURLOPT_POSTREDIR. FR #49571. (Sriram Natarajan)
 - Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing li...@haxx.se)
+- Added client-side server name indication support in openssl. (Arnaud)

 - Fixed error_log() to be binary safe when using message_type 3. (Jani)
 - Fixed unnecessary invocation of setitimer when timeouts have been disabled.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 15:16:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291502

Log:
bfn

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-11-30 15:11:29 UTC (rev 291501)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-11-30 15:16:50 UTC (rev 291502)
@@ -46,6 +46,8 @@
 - Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
   when there is no error). (Jani)
 - Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
+- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
+  non-existant file). (Dmitry)
 - Fixed bug #50159 (wrong working directory in symlinked files). (Dmitry)
 - Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
   containing = or ?). (Pierrick)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /SVNROOT/ commit-email.php global_avail

2009-11-30 Thread Philip Olson
philip   Mon, 30 Nov 2009 18:41:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291516

Log:
Doc karma for Satoru Yoshida (satoruyoshida)

Changed paths:
U   SVNROOT/commit-email.php
U   SVNROOT/global_avail

Modified: SVNROOT/commit-email.php
===
--- SVNROOT/commit-email.php	2009-11-30 18:03:21 UTC (rev 291515)
+++ SVNROOT/commit-email.php	2009-11-30 18:41:06 UTC (rev 291516)
@@ -172,6 +172,10 @@
 $readable_path_list =  . implode(PHP_EOL . , $commit_info['raw_changed_paths']);
 $nspaces = str_repeat( , max(1, 72 - strlen($commit_info['author']) - strlen($email_date)));

+if ((strlen($readable_path_list) + $diffs_length)  25) {
+$readable_path_list = 'changed paths exceeded maximum size';
+}
+
 $msg_body = MIMEBODY
 From: {$fullname} {$commit_info['author']...@php.net
 To: {$email_list}

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail	2009-11-30 18:03:21 UTC (rev 291515)
+++ SVNROOT/global_avail	2009-11-30 18:41:06 UTC (rev 291516)
@@ -47,7 +47,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.


[PHP-CVS] svn: /php/php-src/trunk/ext/sqlite/ config.m4

2009-11-30 Thread Rasmus Lerdorf
rasmus   Mon, 30 Nov 2009 19:13:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291517

Log:
Fix bug #50337

Bug: http://bugs.php.net/50337 (Bogus) Caching of pdo_cv_inc_path breaks 
compile of PDO extensions
  
Changed paths:
U   php/php-src/trunk/ext/sqlite/config.m4

Modified: php/php-src/trunk/ext/sqlite/config.m4
===
--- php/php-src/trunk/ext/sqlite/config.m4  2009-11-30 18:41:06 UTC (rev 
291516)
+++ php/php-src/trunk/ext/sqlite/config.m4  2009-11-30 19:13:50 UTC (rev 
291517)
@@ -50,7 +50,6 @@
 PHP_CHECK_PDO_INCLUDES([], [AC_MSG_WARN([Cannot find php_pdo_driver.h.])])
 if test -n $pdo_cv_inc_path; then
   AC_DEFINE([PHP_SQLITE2_HAVE_PDO], [1], [Have PDO])
-  pdo_cv_inc_path=-I$pdo_cv_inc_path
 fi
   fi

@@ -83,13 +82,13 @@
   -L$SQLITE_DIR/$PHP_LIBDIR -lm
 ])
 SQLITE_MODULE_TYPE=external
-PHP_SQLITE_CFLAGS=$pdo_cv_inc_path
+PHP_SQLITE_CFLAGS=-I$pdo_cv_inc_path
 sqlite_extra_sources=libsqlite/src/encode.c
   else
 # use bundled library
 PHP_PROG_LEMON
 SQLITE_MODULE_TYPE=builtin
-PHP_SQLITE_CFLAGS=-...@ext_srcdir@/libsqlite/src 
-...@ext_builddir@/libsqlite/src $pdo_cv_inc_path
+PHP_SQLITE_CFLAGS=-...@ext_srcdir@/libsqlite/src 
-...@ext_builddir@/libsqlite/src -I$pdo_cv_inc_path
 sqlite_extra_sources=libsqlite/src/opcodes.c \
 libsqlite/src/parse.c libsqlite/src/encode.c \
 libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /SVNROOT/ commit-email.php

2009-11-30 Thread Philip Olson
philip   Mon, 30 Nov 2009 19:24:54 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291518

Log:
- This deals with an accidental commit I made 30 minutes ago (thanks to Pierre 
for spotting this)
- This check ensures the commit mail size doesn't exceed our mailing list 
maximum
- A check for diff size already exists, while this now also checks path size 
(so when a ton of files are touched)
- Updated code to use 262144, like the diff check does, as an excuse to make 
this commit

Changed paths:
U   SVNROOT/commit-email.php

Modified: SVNROOT/commit-email.php
===
--- SVNROOT/commit-email.php2009-11-30 19:13:50 UTC (rev 291517)
+++ SVNROOT/commit-email.php2009-11-30 19:24:54 UTC (rev 291518)
@@ -172,7 +172,8 @@
 $readable_path_list =  . implode(PHP_EOL . , 
$commit_info['raw_changed_paths']);
 $nspaces = str_repeat( , max(1, 72 - strlen($commit_info['author']) - 
strlen($email_date)));

-if ((strlen($readable_path_list) + $diffs_length)  25) {
+// Help ensure all commits make it to the mailing lists, which have size 
restrictions
+if ((strlen($readable_path_list) + $diffs_length)  262144) {
 $readable_path_list = 'changed paths exceeded maximum size';
 }


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ext/filter/tests/ 046.phpt

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 19:52:16 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291519

Log:
MFH: removed last test for MAX_INT, did not work on x64 and this case is 
covered by bug47745.phpt

Bug: http://bugs.php.net/47745 (Closed) FILTER_VALIDATE_INT doesn't allow 
minimum integer
  
Changed paths:
U   php/php-src/branches/PHP_5_2/ext/filter/tests/046.phpt

Modified: php/php-src/branches/PHP_5_2/ext/filter/tests/046.phpt
===
--- php/php-src/branches/PHP_5_2/ext/filter/tests/046.phpt  2009-11-30 
19:24:54 UTC (rev 291518)
+++ php/php-src/branches/PHP_5_2/ext/filter/tests/046.phpt  2009-11-30 
19:52:16 UTC (rev 291519)
@@ -12,12 +12,8 @@

 $s = sprintf(%d, -PHP_INT_MAX);
 var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));
-
-$s = sprintf(%.0f, ~(PHP_INT_MAX)-1);
-var_dump(filter_var($s, FILTER_VALIDATE_INT));
 ?
 --EXPECT--
 bool(true)
 bool(false)
 bool(true)
-bool(false)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/Zend/tests/bug50174.phpt branches/PHP_5_2/ext/iconv/tests/iconv_encoding_basic.phpt branches/PHP_5_2/ext/iconv/tests/iconv_substr_basic.phpt branches/PHP_

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 20:31:52 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291521

Log:
- Fix tests assuming wrong ini options and extensions that might not be there

Changed paths:
U   php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt
U   php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_encoding_basic.phpt
U   php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_substr_basic.phpt
U   php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt
U   php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_encoding_basic.phpt
U   php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_substr_basic.phpt
U   php/php-src/trunk/ext/iconv/tests/iconv_encoding_basic.phpt
U   php/php-src/trunk/ext/iconv/tests/iconv_substr_basic.phpt

Modified: php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt
===
--- php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt   2009-11-30 
20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt   2009-11-30 
20:31:52 UTC (rev 291521)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #50174 (Incorrectly matched docComment)
+--SKIPIF--
+?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print 
skip; ?
 --FILE--
 ?php


Modified: php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_encoding_basic.phpt
===
--- php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_encoding_basic.phpt  
2009-11-30 20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_encoding_basic.phpt  
2009-11-30 20:31:52 UTC (rev 291521)
@@ -5,6 +5,10 @@
 extension_loaded('iconv') or die('skip');
 function_exists('iconv_get_encoding') or die(skip iconv_get_encoding() is not 
available in this build);
 ?
+--INI--
+iconv.input_encoding=ISO-8859-1
+iconv.internal_encoding=ISO-8859-1
+iconv.output_encoding=ISO-8859-1
 --FILE--
 ?php
 /* Prototype  : mixed iconv_get_encoding([string type])
@@ -91,4 +95,4 @@
   [internal_encoding]=
   string(5) UTF-8
 }
-Done
\ No newline at end of file
+Done

Modified: php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_substr_basic.phpt
===
--- php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_substr_basic.phpt
2009-11-30 20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_substr_basic.phpt
2009-11-30 20:31:52 UTC (rev 291521)
@@ -5,6 +5,10 @@
 extension_loaded('iconv') or die('skip');
 function_exists('iconv_substr') or die(skip iconv_substr() is not available 
in this build);
 ?
+--INI--
+iconv.input_encoding=ISO-8859-1
+iconv.internal_encoding=ISO-8859-1
+iconv.output_encoding=ISO-8859-1
 --FILE--
 ?php
 /* Prototype  : string iconv_substr(string str, int offset, [int length, 
string charset])
@@ -52,4 +56,4 @@

 -- Multibyte string 2 --
 string(42) e8aa9ee38386e382ade382b9e38388e381a7e38199
-Done
\ No newline at end of file
+Done

Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt   2009-11-30 
20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt   2009-11-30 
20:31:52 UTC (rev 291521)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #50174 (Incorrectly matched docComment)
+--SKIPIF--
+?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print 
skip; ?
 --FILE--
 ?php


Modified: php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_encoding_basic.phpt
===
--- php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_encoding_basic.phpt  
2009-11-30 20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_encoding_basic.phpt  
2009-11-30 20:31:52 UTC (rev 291521)
@@ -5,6 +5,10 @@
 extension_loaded('iconv') or die('skip');
 function_exists('iconv_get_encoding') or die(skip iconv_get_encoding() is not 
available in this build);
 ?
+--INI--
+iconv.input_encoding=ISO-8859-1
+iconv.internal_encoding=ISO-8859-1
+iconv.output_encoding=ISO-8859-1
 --FILE--
 ?php
 /* Prototype  : mixed iconv_get_encoding([string type])
@@ -91,4 +95,4 @@
   [internal_encoding]=
   string(5) UTF-8
 }
-Done
\ No newline at end of file
+Done

Modified: php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_substr_basic.phpt
===
--- php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_substr_basic.phpt
2009-11-30 20:11:15 UTC (rev 291520)
+++ php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_substr_basic.phpt
2009-11-30 20:31:52 UTC (rev 291521)
@@ -5,6 +5,10 @@
 extension_loaded('iconv') or die('skip');
 function_exists('iconv_substr') or die(skip iconv_substr() is not available 
in this build);
 ?
+--INI--

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/configure.in branches/PHP_5_3/configure.in trunk/configure.in

2009-11-30 Thread Gwynne Raskind
gwynne   Mon, 30 Nov 2009 21:38:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291523

Log:
The old Darwin hack is BROKEN and INCORRECT. It works only for Darwin 9, not 
10, and uses an ugly CFLAGS hack that messes with the entire build. This 
version sets one cached value to the correct result for Darwin 9 and 10. It's 
cleaner, has no side effects, has nothing to do with Autoconf versions, and 
works for everyone.

Changed paths:
U   php/php-src/branches/PHP_5_2/configure.in
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/trunk/configure.in

Modified: php/php-src/branches/PHP_5_2/configure.in
===
--- php/php-src/branches/PHP_5_2/configure.in   2009-11-30 21:02:46 UTC (rev 
291522)
+++ php/php-src/branches/PHP_5_2/configure.in   2009-11-30 21:38:44 UTC (rev 
291523)
@@ -122,21 +122,6 @@
 $php_shtool mkdir -p libs
 rm -f libs/*

-dnl Darwin 9 hack
-dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
-dnl causes errors in all current and past versions of Autoconf, we do a little
-dnl messing with the CFLAGS here to trick it.
-php_did_darwin9_cheat=0
-case $host_alias in
-*darwin9*)
-  hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
-  if test x$hasg = x; then
-php_did_darwin9_cheat=1
-CFLAGS=$CFLAGS -gstabs
-  fi
-  ;;
-esac
-
 dnl Checks for programs.
 dnl -

@@ -1331,6 +1316,14 @@

 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS

+dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
+dnl This hack works around it. Ugly.
+case $host_alias in
+*darwin9*|*darwin10*)
+   ac_cv_exeext=
+   ;;
+esac
+
 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called 
(by PHP_REQUIRE_CXX).
 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
@@ -1354,15 +1347,6 @@

 CC=$old_CC

-dnl Finish the Darwin hack
-if test $php_did_darwin9_cheat -eq 1; then
-  if test $PHP_DEBUG = 1; then
-CFLAGS=`echo $CFLAGS | $SED -e 's/-gstabs/-g/g'`
-  else
-CFLAGS=`echo -O2 $CFLAGS | $SED -e 's/-gstabs//g'`
-  fi
-fi
-
 PHP_CONFIGURE_PART(Generating files)

 CXXFLAGS_CLEAN=$CXXFLAGS

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-11-30 21:02:46 UTC (rev 
291522)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-11-30 21:38:44 UTC (rev 
291523)
@@ -122,21 +122,6 @@
 $php_shtool mkdir -p libs
 rm -f libs/*

-dnl Darwin 9 hack
-dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
-dnl causes errors in all current and past versions of Autoconf, we do a little
-dnl messing with the CFLAGS here to trick it.
-php_did_darwin9_cheat=0
-case $host_alias in
-*darwin9*)
-  hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
-  if test x$hasg = x; then
-php_did_darwin9_cheat=1
-CFLAGS=$CFLAGS -gstabs
-  fi
-  ;;
-esac
-
 dnl Checks for programs.
 dnl -

@@ -1339,6 +1324,14 @@

 LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS

+dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
+dnl This hack works around it. Ugly.
+case $host_alias in
+*darwin9*|*darwin10*)
+   ac_cv_exeext=
+   ;;
+esac
+
 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called 
(by PHP_REQUIRE_CXX).
 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
@@ -1362,15 +1355,6 @@

 CC=$old_CC

-dnl Finish the Darwin hack
-if test $php_did_darwin9_cheat -eq 1; then
-  if test $PHP_DEBUG = 1; then
-CFLAGS=`echo $CFLAGS | $SED -e 's/-gstabs/-g/g'`
-  else
-CFLAGS=`echo -O2 $CFLAGS | $SED -e 's/-gstabs//g'`
-  fi
-fi
-
 PHP_CONFIGURE_PART(Generating files)

 CXXFLAGS_CLEAN=$CXXFLAGS

Modified: php/php-src/trunk/configure.in
===
--- php/php-src/trunk/configure.in  2009-11-30 21:02:46 UTC (rev 291522)
+++ php/php-src/trunk/configure.in  2009-11-30 21:38:44 UTC (rev 291523)
@@ -124,21 +124,6 @@
 $php_shtool mkdir -p libs
 rm -f libs/*

-dnl Darwin 9 hack
-dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
-dnl causes errors in all current and past versions of Autoconf, we do a little
-dnl messing with the CFLAGS here to trick it.
-php_did_darwin9_cheat=0
-case $host_alias in
-*darwin9*)
-  hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
-  if test x$hasg = x; then
-php_did_darwin9_cheat=1
-CFLAGS=$CFLAGS -gstabs
-  fi
-  ;;
-esac
-
 dnl Checks for programs.
 dnl -

@@ -1277,6 +1262,14 @@

 LDFLAGS=$LDFLAGS 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_ini_scanner.l trunk/Zend/zend_ini_scanner.l

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 22:38:32 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291525

Log:
- Fixed bug #50340 (php.ini parser does not allow spaces in ini keys)

Bug: http://bugs.php.net/50340 (Open) php.ini parser does not allow spaces in 
ini keys
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
U   php/php-src/trunk/Zend/zend_ini_scanner.l

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-11-30 21:55:56 UTC (rev 291524)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-11-30 22:38:32 UTC (rev 291525)
@@ -23,6 +23,7 @@
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)

+- Fixed bug #50340 (php.ini parser does not allow spaces in ini keys). (Jani)
 - Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
   (Felipe)
 - Fixed bug #50282 (xmlrpc_encode_request() changes object into array in

Modified: php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l
===
--- php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-11-30 
21:55:56 UTC (rev 291524)
+++ php/php-src/branches/PHP_5_3/Zend/zend_ini_scanner.l2009-11-30 
22:38:32 UTC (rev 291525)
@@ -105,6 +105,17 @@
 ZEND_API zend_ini_scanner_globals ini_scanner_globals;
 #endif

+/* Eat leading whitespace */
+#define EAT_LEADING_WHITESPACE() \
+   while (yytext[0]) {  \
+   if (yytext[0] == ' ' || yytext[0] == '\t') { \
+   SCNG(yy_text)++; \
+   yyleng--;\
+   } else { \
+   break;   \
+   }\
+   }
+
 /* Eat trailing whitespace + extra char */
 #define EAT_TRAILING_WHITESPACE_EX(ch)  \
while (yyleng  0  (  \
@@ -326,7 +337,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [^=\n\r\t ;|$~(){}!\[]+
+LABEL [^=\n\r\t;|$~(){}!\[]+
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${
@@ -367,6 +378,9 @@
 }

 INITIAL{LABEL}[{TABS_AND_SPACES}* { /* Start of option with offset */
+   /* Eat leading whitespace */
+   EAT_LEADING_WHITESPACE();
+
/* Eat trailing whitespace and [ */
EAT_TRAILING_WHITESPACE_EX('[');

@@ -387,6 +401,12 @@
 }

 ST_VARNAME{LABEL} { /* Variable name */
+   /* Eat leading whitespace */
+   EAT_LEADING_WHITESPACE();
+
+   /* Eat trailing whitespace */
+   EAT_TRAILING_WHITESPACE();
+
RETURN_TOKEN(TC_VARNAME, yytext, yyleng);
 }

@@ -404,6 +424,12 @@
 }

 INITIAL{LABEL} { /* Get option name */
+   /* Eat leading whitespace */
+   EAT_LEADING_WHITESPACE();
+
+   /* Eat trailing whitespace */
+   EAT_TRAILING_WHITESPACE();
+
RETURN_TOKEN(TC_LABEL, yytext, yyleng);
 }


Modified: php/php-src/trunk/Zend/zend_ini_scanner.l
===
--- php/php-src/trunk/Zend/zend_ini_scanner.l   2009-11-30 21:55:56 UTC (rev 
291524)
+++ php/php-src/trunk/Zend/zend_ini_scanner.l   2009-11-30 22:38:32 UTC (rev 
291525)
@@ -105,6 +105,17 @@
 ZEND_API zend_ini_scanner_globals ini_scanner_globals;
 #endif

+/* Eat leading whitespace */
+#define EAT_LEADING_WHITESPACE() \
+   while (yytext[0]) {  \
+   if (yytext[0] == ' ' || yytext[0] == '\t') { \
+   SCNG(yy_text)++; \
+   yyleng--;\
+   } else { \
+   break;   \
+   }\
+   }
+
 /* Eat trailing whitespace + extra char */
 #define EAT_TRAILING_WHITESPACE_EX(ch)  \
while (yyleng  0  (  \
@@ -326,7 +337,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [^=\n\r\t ;|$~(){}!\[]+
+LABEL [^=\n\r\t;|$~(){}!\[]+
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${
@@ -367,6 +378,9 @@
 }

 INITIAL{LABEL}[{TABS_AND_SPACES}* { /* Start of option with offset */
+   /* Eat leading whitespace */
+   EAT_LEADING_WHITESPACE();
+
/* Eat trailing whitespace and [ */
EAT_TRAILING_WHITESPACE_EX('[');

@@ -387,6 +401,12 @@
 }

 ST_VARNAME{LABEL} { /* Variable name */
+   /* Eat leading whitespace */
+   EAT_LEADING_WHITESPACE();
+
+   /* Eat trailing whitespace */
+   

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_ini_scanner.c branches/PHP_5_3/Zend/zend_ini_scanner_defs.h trunk/Zend/zend_ini_scanner.c trunk/Zend/zend_ini_scanner_defs.h

2009-11-30 Thread Jani Taskinen
jani Mon, 30 Nov 2009 22:39:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291526

Log:
- Touch?\195?\169 fil?\195?\169s

Changed paths:
changed paths exceeded maximum size

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_ini_scanner.c branches/PHP_5_3/Zend/zend_ini_scanner_defs.h trunk/Zend/zend_ini_scanner.c trunk/Zend/zend_ini_scanner_defs.h

2009-11-30 Thread Jani Taskinen

1. Does not deal with utf8 stuff very well..?
2. Paths..?
3. Diff..?

I'd say revert whatever you did..

--Jani


Jani Taskinen wrote:

jani Mon, 30 Nov 2009 22:39:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291526

Log:
- Touch?\195?\169 fil?\195?\169s

Changed paths:
changed paths exceeded maximum size

diffs exceeded maximum size




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_ini_scanner.c branches/PHP_5_3/Zend/zend_ini_scanner_defs.h trunk/Zend/zend_ini_scanner.c trunk/Zend/zend_ini_scanner_defs.h

2009-11-30 Thread Gwynne Raskind
On Nov 30, 2009, at 5:45 PM, Jani Taskinen wrote:
 1. Does not deal with utf8 stuff very well..?
 2. Paths..?
 3. Diff..?
 
 I'd say revert whatever you did..
 
 --Jani

The missing paths are Philip's fault (the diffs size shouldn't have been used 
in determining whether to hide the paths), the UTF-8 problems were there before 
(and shouldn't have been, thus my fault). I'll fix.

 Jani Taskinen wrote:
 jani Mon, 30 Nov 2009 22:39:59 +
 Revision: http://svn.php.net/viewvc?view=revisionrevision=291526
 Log:
 - Touch?\195?\169 fil?\195?\169s
 Changed paths:
 changed paths exceeded maximum size
 diffs exceeded maximum size


-- Gwynne


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_ini_scanner.c branches/PHP_5_3/Zend/zend_ini_scanner_defs.h trunk/Zend/zend_ini_scanner.c trunk/Zend/zend_ini_scanner_defs.h

2009-11-30 Thread Gwynne Raskind
On Nov 30, 2009, at 5:45 PM, Jani Taskinen wrote:
 1. Does not deal with utf8 stuff very well..?
 2. Paths..?
 3. Diff..?
 
 I'd say revert whatever you did..

Having taken another look at the UTF-8 issue, I'd say this was a problem with 
your SVN, not anything here. The log message got entered into SVN with the 
escapes that way; by the time it reached the server it was already wrong. Check 
your ~/.subversion/config for the log-encoding setting; if it's set correctly 
let me know and I'll dig further. I'll commit a robust fix for the lengths 
issue shortly.

-- Gwynne


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/libxml/libxml.c branches/PHP_5_2/ext/soap/php_xml.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/libxml/libxml.c branches/PHP_5_3/

2009-11-30 Thread Felipe Pena
felipe   Tue, 01 Dec 2009 02:05:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291533

Log:
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
  single text node when using libxml2.7.3+. (Kalle)
[DOC]

Bug: http://bugs.php.net/49660 (Open) libxml 2.7.3+ limits text nodes to 10MB
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/libxml/libxml.c
U   php/php-src/branches/PHP_5_2/ext/soap/php_xml.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/libxml/libxml.c
U   php/php-src/branches/PHP_5_3/ext/soap/php_xml.c
U   php/php-src/trunk/ext/libxml/libxml.c
U   php/php-src/trunk/ext/soap/php_xml.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-12-01 00:38:02 UTC (rev 291532)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-12-01 02:05:28 UTC (rev 291533)
@@ -1,11 +1,15 @@
 PHPNEWS
 |||
 ?? Dec 2009, PHP 5.2.12RC4
+- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
+  single text node when using libxml2.7.3+. (Kalle)
+
 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)

 - Fixed bug #50266 (conflicting types for llabs). (Jani)
 - Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
   non-existant file). (Dmitry)
+- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)

 27 Nov 2009, PHP 5.2.12RC3
 - Fixed break in the build chain introduced in 5.2.12RC2 (Jani)

Modified: php/php-src/branches/PHP_5_2/ext/libxml/libxml.c
===
--- php/php-src/branches/PHP_5_2/ext/libxml/libxml.c2009-12-01 00:38:02 UTC 
(rev 291532)
+++ php/php-src/branches/PHP_5_2/ext/libxml/libxml.c2009-12-01 02:05:28 UTC 
(rev 291533)
@@ -627,6 +627,9 @@
REGISTER_LONG_CONSTANT(LIBXML_COMPACT,XML_PARSE_COMPACT,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NOXMLDECL,  XML_SAVE_NO_DECL,   
CONST_CS | CONST_PERSISTENT);
 #endif
+#if LIBXML_VERSION = 20703
+   REGISTER_LONG_CONSTANT(LIBXML_PARSEHUGE,  XML_PARSE_HUGE, 
CONST_CS | CONST_PERSISTENT);
+#endif
REGISTER_LONG_CONSTANT(LIBXML_NOEMPTYTAG, LIBXML_SAVE_NOEMPTYTAG, 
CONST_CS | CONST_PERSISTENT);

/* Error levels */

Modified: php/php-src/branches/PHP_5_2/ext/soap/php_xml.c
===
--- php/php-src/branches/PHP_5_2/ext/soap/php_xml.c 2009-12-01 00:38:02 UTC 
(rev 291532)
+++ php/php-src/branches/PHP_5_2/ext/soap/php_xml.c 2009-12-01 02:05:28 UTC 
(rev 291533)
@@ -138,6 +138,9 @@
ctxt-sax-warning = NULL;
ctxt-sax-error = NULL;
/*ctxt-sax-fatalError = NULL;*/
+#if LIBXML_VERSION = 20703
+   ctxt-options |= XML_PARSE_HUGE;
+#endif
xmlParseDocument(ctxt);
if (ctxt-wellFormed) {
ret = ctxt-myDoc;

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-01 00:38:02 UTC (rev 291532)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-01 02:05:28 UTC (rev 291533)
@@ -1,6 +1,9 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.2
+- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
+  single text node when using libxml2.7.3+. (Kalle)
+
 - Upgraded bundled sqlite to version 3.6.20. (Ilia)
 - Upgraded bundled PCRE to version 8.00. (Scott)

@@ -81,6 +84,7 @@
   property in base class). (Felipe)
 - Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
   ini variables). (Jani)
+- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
 - Fixed bug #49647 (DOMUserData does not exist). (Rob)
 - Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
   (Pierrick)

Modified: php/php-src/branches/PHP_5_3/ext/libxml/libxml.c
===
--- php/php-src/branches/PHP_5_3/ext/libxml/libxml.c2009-12-01 00:38:02 UTC 
(rev 291532)
+++ php/php-src/branches/PHP_5_3/ext/libxml/libxml.c2009-12-01 02:05:28 UTC 
(rev 291533)
@@ -622,6 +622,9 @@
REGISTER_LONG_CONSTANT(LIBXML_COMPACT,XML_PARSE_COMPACT,  
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(LIBXML_NOXMLDECL,  XML_SAVE_NO_DECL,   

[PHP-CVS] svn: /SVNROOT/ commit-email.php

2009-11-30 Thread Gwynne Raskind
gwynne   Tue, 01 Dec 2009 04:29:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291534

Log:
1) sanitize Subject and From headers more thorughly, 2) calculate large email 
sizes more correctly

Changed paths:
U   SVNROOT/commit-email.php

Modified: SVNROOT/commit-email.php
===
--- SVNROOT/commit-email.php2009-12-01 02:05:28 UTC (rev 291533)
+++ SVNROOT/commit-email.php2009-12-01 04:29:13 UTC (rev 291534)
@@ -162,18 +162,37 @@
 }

 // 
-
+// Safely utf-8-ize an email header with the short version of quoted-printable
+function utf8_safe_header($header_value)
+{
+// As per experience and 
http://www.php.net/manual/en/function.imap-8bit.php#75081
+// 1 - Limit string to 900 chars, giving some slop for the replacements 
and extensions
+// 2 - imap_8bit() the string
+// 3 - Replace =\r\n with nothing, _ with =5F, and ? with =3F
+// 6 - Replace space with _
+// 7 - Surround with =?utf-8?q??=
+return '=?utf-8?q?' . str_replace(' ', '_', str_replace(array('_', 
=\r\n, '?'), array('=5F', '', '=3F'),
+imap_8bit(substr($header_value, 0, 900 . '?=';
+}
+
+// 
-
 // Build e-mail
 $boundary = sha1({$commit_info['author']}{$commit_info['date']});
 $messageid = {$commit_info['author']}-{$commit_info['date']}-{$REV}- . 
mt_rand();
-$subject = substr(svn: {$paths_list}, 0, 970); // Max SMTP line length = 
998. Some slop in this value.
+$subject = utf8_safe_header(svn: {$paths_list});
 $email_date = date(DATE_RFC2822, $commit_info['date']);
-$fullname = =?utf-8?q? . imap_8bit(str_replace(array('?', ' '), array('=3F', 
'_'), $commit_info['author_name'])) . ?=;
+$fullname = utf8_safe_header($commit_info['author_name']);
 $email_list = implode(', ', $emails_to);
 $readable_path_list =  . implode(PHP_EOL . , 
$commit_info['raw_changed_paths']);
 $nspaces = str_repeat( , max(1, 72 - strlen($commit_info['author']) - 
strlen($email_date)));

-// Help ensure all commits make it to the mailing lists, which have size 
restrictions
-if ((strlen($readable_path_list) + $diffs_length)  262144) {
+// Help ensure all commits make it to the mailing lists, which have size 
restrictions.
+// Add the path list length to: 1) the diff string length (which will be zero 
if diffs ARE attached), and
+//  2) the diff data length (which will be zero if diffs are NOT attached).
+// If the total is larger than 256K, don't include the path list. If it still 
goes over the limit even after that,
+//  the email is gonna be too big to send no matter what we do.
+$diff_data = $diffs_string === NULL ? 
wordwrap(base64_encode($commit_info['diffs']), 80, PHP_EOL, TRUE) : '';
+if ((strlen($readable_path_list) + strlen($diffs_string) + strlen($diff_data)) 
 262144) {
 $readable_path_list = 'changed paths exceeded maximum size';
 }

@@ -205,7 +224,6 @@
 MIMEBODY;

 if ($diffs_string === NULL) {
-$diff_data = wordwrap(base64_encode($commit_info['diffs']), 80, PHP_EOL, 
TRUE);
 $msg_body .= MIMEBODY

 Content-Type: text/x-diff; charset=utf-8

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php