[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/pcre/pcrelib/config.h branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pcre/pcrelib/config.h trunk/ext/pcre/pcrelib/config.h

2010-07-27 Thread Sriram Natarajan
srinatar Tue, 27 Jul 2010 21:42:22 +

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

Log:
- Fixed bug #52436 (Compile error in pcre if systems do not have stdint.h)
# PCRE's config.h can very well reuse the definitions made available from
# PHP's configure script output available within php_config.h

Bug: http://bugs.php.net/52436 (Assigned) Compile error if systems do not have 
stdint.h
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/pcre/pcrelib/config.h
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/config.h
U   php/php-src/trunk/ext/pcre/pcrelib/config.h

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-07-27 21:09:56 UTC (rev 301624)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-07-27 21:42:22 UTC (rev 301625)
@@ -2,6 +2,8 @@
 |||
 ?? ??? 2010, PHP 5.2.15

+- Fixed bug #52436 (Compile error if systems do not have stdint.h)
+  (Sriram Natarajan)

 22 Jul 2010, PHP 5.2.14
 - Reverted bug fix #49521 (PDO fetchObject sets values before calling

Modified: php/php-src/branches/PHP_5_2/ext/pcre/pcrelib/config.h
===
--- php/php-src/branches/PHP_5_2/ext/pcre/pcrelib/config.h  2010-07-27 
21:09:56 UTC (rev 301624)
+++ php/php-src/branches/PHP_5_2/ext/pcre/pcrelib/config.h  2010-07-27 
21:42:22 UTC (rev 301625)
@@ -1,5 +1,7 @@

 #include php_compat.h
+#include php_config.h
+
 #undef PACKAGE_NAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_TARNAME
@@ -8,6 +10,8 @@
 #define SUPPORT_UCP
 #define SUPPORT_UTF8

+/* Exclude these below definitions when building within PHP */
+#ifndef ZEND_API

 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
@@ -179,6 +183,9 @@
 /* Define to 1 if you have `_strtoi64'. */
 /* #undef HAVE__STRTOI64 */

+/* Exclude these above definitions when building within PHP */
+#endif
+
 /* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
compiled patterns up to 64K long. This covers the vast majority of cases.

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-07-27 21:09:56 UTC (rev 301624)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-07-27 21:42:22 UTC (rev 301625)
@@ -2,6 +2,9 @@
 |||
 ?? ??? 2010, PHP 5.3.4

+- Fixed bug #52436 (Compile error if systems do not have stdint.h)
+  (Sriram Natarajan)
+
 22 Jul 2010, PHP 5.3.3
 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
 - Upgraded bundled PCRE to version 8.02. (Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/config.h
===
--- php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/config.h  2010-07-27 
21:09:56 UTC (rev 301624)
+++ php/php-src/branches/PHP_5_3/ext/pcre/pcrelib/config.h  2010-07-27 
21:42:22 UTC (rev 301625)
@@ -1,5 +1,7 @@

 #include php_compat.h
+#include php_config.h
+
 #undef PACKAGE_NAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_TARNAME
@@ -18,6 +20,8 @@
 # define PCRE_EXP_DATA_DEFN__attribute__ ((visibility(default)))
 #endif

+/* Exclude these below definitions when building within PHP */
+#ifndef ZEND_API

 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
@@ -189,6 +193,9 @@
 /* Define to 1 if you have `_strtoi64'. */
 /* #undef HAVE__STRTOI64 */

+/* Exclude these above definitions when building within PHP */
+#endif
+
 /* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
compiled patterns up to 64K long. This covers the vast majority of cases.

Modified: php/php-src/trunk/ext/pcre/pcrelib/config.h
===
--- php/php-src/trunk/ext/pcre/pcrelib/config.h 2010-07-27 21:09:56 UTC (rev 
301624)
+++ php/php-src/trunk/ext/pcre/pcrelib/config.h 2010-07-27 21:42:22 UTC (rev 
301625)
@@ -1,5 +1,7 @@

 #include php_compat.h
+#include php_config.h
+
 #undef PACKAGE_NAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_TARNAME
@@ -18,6 +20,8 @@
 # define PCRE_EXP_DATA_DEFN__attribute__ ((visibility(default)))
 #endif

+/* Exclude these below definitions when building within PHP */
+#ifndef ZEND_API

 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
@@ -189,6 +193,9

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

2010-06-23 Thread Sriram Natarajan
srinatar Wed, 23 Jun 2010 19:06:33 +

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

Log:
- Fixed bug #52162 (custom request header variables with numbers are removed)

Bug: http://bugs.php.net/52162 (Assigned) for NSAPI module, custom request 
header variables with numbers are removed
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c
U   php/php-src/trunk/sapi/nsapi/nsapi.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-06-23 18:28:26 UTC (rev 300706)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-06-23 19:06:33 UTC (rev 300707)
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? Jun 2010, PHP 5.2.14
+- Fixed bug #52162 (custom request header variables with numbers are removed).
+  (Sriram Natarajan)
 - Fixed bug #52061 (memory_limit above 2G). (Felipe)
 - Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command).
   (Ilia, Felipe)

Modified: php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c
===
--- php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c 2010-06-23 18:28:26 UTC 
(rev 300706)
+++ php/php-src/branches/PHP_5_2/sapi/nsapi/nsapi.c 2010-06-23 19:06:33 UTC 
(rev 300707)
@@ -634,7 +634,7 @@
if (value) {
for(p = value + pos; *p; p++) {
*p = toupper(*p);
-   if (*p  'A' || *p  'Z') {
+   if (!isalnum(*p)) {
*p = '_';
}
}

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-06-23 18:28:26 UTC (rev 300706)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-06-23 19:06:33 UTC (rev 300707)
@@ -3,6 +3,8 @@
 ?? ??? 2010, PHP 5.3.3 RC2
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
 - Fixed the mail.log ini setting when no filename was given. (Johannes)
+- Fixed bug #52162 (custom request header variables with numbers are removed).
+  (Sriram Natarajan)
 - Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
   (Andrey)


Modified: php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c
===
--- php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c 2010-06-23 18:28:26 UTC 
(rev 300706)
+++ php/php-src/branches/PHP_5_3/sapi/nsapi/nsapi.c 2010-06-23 19:06:33 UTC 
(rev 300707)
@@ -687,7 +687,7 @@
if (value) {
for(p = value + pos; *p; p++) {
*p = toupper(*p);
-   if (*p  'A' || *p  'Z') {
+   if (!isalnum(*p)) {
*p = '_';
}
}

Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
===
--- php/php-src/trunk/sapi/nsapi/nsapi.c2010-06-23 18:28:26 UTC (rev 
300706)
+++ php/php-src/trunk/sapi/nsapi/nsapi.c2010-06-23 19:06:33 UTC (rev 
300707)
@@ -684,7 +684,7 @@
if (value) {
for(p = value + pos; *p; p++) {
*p = toupper(*p);
-   if (*p  'A' || *p  'Z') {
+   if (!isalnum(*p)) {
*p = '_';
}
}

-- 
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/date/php_date.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2010-06-08 Thread Sriram Natarajan
srinatar Tue, 08 Jun 2010 21:23:48 +

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

Log:
- Fixed Bug #51168 (fails to compile with Sun Studio)
 # C99 standard supports inline keyword and supported by
 # by major compilers like GCC, HP C, IBM C and Sun C

Bug: http://bugs.php.net/51168 (Bogus) Userland Cyclic Reference with Nested 
DateTime are not garbage collected
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/date/php_date.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-06-08 21:03:34 UTC (rev 300293)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-06-08 21:23:48 UTC (rev 300294)
@@ -58,6 +58,8 @@
   includes '-'). (Adam, solar at azrael dot ws).
 - Fixed bug #51190 (ftp_put() returns false when transfer was successful).
   (Ilia)
+- Fixed bug #51183 (ext/date/php_date.c fails to compile with Sun Studio).
+  (Sriram Natarajan)
 - Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when
   an invalid option is provided). (Ilia)
 - Fixed bug #51128 (imagefill() doesn't work with large images). (Pierre)

Modified: php/php-src/branches/PHP_5_2/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_2/ext/date/php_date.c2010-06-08 21:03:34 UTC 
(rev 300293)
+++ php/php-src/branches/PHP_5_2/ext/date/php_date.c2010-06-08 21:23:48 UTC 
(rev 300294)
@@ -35,7 +35,7 @@
 #elif defined(__GNUC__)  __GNUC__  3
 static __inline __int64_t php_date_llabs( __int64_t i ) { return i = 0 ? i : 
-i; }
 #else
-static __inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
+static inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
 #endif

 /* {{{ arginfo */

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-06-08 21:03:34 UTC (rev 300293)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-06-08 21:23:48 UTC (rev 300294)
@@ -144,6 +144,8 @@
   alexr at oplot dot com)
 - Fixed bug #51190 (ftp_put() returns false when transfer was successful).
   (Ilia)
+- Fixed bug #51183 (ext/date/php_date.c fails to compile with Sun Studio).
+  (Sriram Natarajan)
 - Fixed bug #51176 (Static calling in non-static method behaves like $this-).
   (Felipe)
 - Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c2010-06-08 21:03:34 UTC 
(rev 300293)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2010-06-08 21:23:48 UTC 
(rev 300294)
@@ -36,7 +36,7 @@
 #elif defined(__GNUC__)  __GNUC__  3
 static __inline __int64_t php_date_llabs( __int64_t i ) { return i = 0 ? i : 
-i; }
 #else
-static __inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
+static inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
 #endif

 /* {{{ arginfo */

Modified: php/php-src/trunk/ext/date/php_date.c
===
--- php/php-src/trunk/ext/date/php_date.c   2010-06-08 21:03:34 UTC (rev 
300293)
+++ php/php-src/trunk/ext/date/php_date.c   2010-06-08 21:23:48 UTC (rev 
300294)
@@ -36,7 +36,7 @@
 #elif defined(__GNUC__)  __GNUC__  3
 static __inline __int64_t php_date_llabs( __int64_t i ) { return i = 0 ? i : 
-i; }
 #else
-static __inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
+static inline long long php_date_llabs( long long i ) { return i = 0 ? i : 
-i; }
 #endif

 /* {{{ arginfo */

-- 
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/ext/curl/interface.c branches/PHP_5_3/ext/curl/tests/curl_ftp_pasv.phpt trunk/ext/curl/interface.c trunk/ext/curl/tests/curl_ftp_pas

2010-01-22 Thread Sriram Natarajan
srinatar Sat, 23 Jan 2010 01:37:32 +

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

Log:
- Fixed bug #50756 (CURLOPT_FTP_SKIP_PASV_IP does not exist.)

Bug: http://bugs.php.net/50756 (Open) CURLOPT_FTP_SKIP_PASV_IP does not exist
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
A   php/php-src/branches/PHP_5_3/ext/curl/tests/curl_ftp_pasv.phpt
U   php/php-src/trunk/ext/curl/interface.c
A   php/php-src/trunk/ext/curl/tests/curl_ftp_pasv.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-01-23 00:16:31 UTC (rev 293861)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-01-23 01:37:32 UTC (rev 293862)
@@ -19,6 +19,7 @@
   streams). (vnegrier at optilian dot com, Ilia)
 - Fixed bug #50761 (system.multiCall crashes in xmlrpc extension). (hiroaki
   dot kawai at gmail dot com, Ilia)
+- Fixed bug #50756 (CURLOPT_FTP_SKIP_PASV_IP does not exist). (Sriram)
 - Fixed bug #50732 (exec() adds single byte twice to $output array). (Ilia)
 - Fixed bug #50728 (All PDOExceptions hardcode 'code' property to 0). (Joey,
   Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2010-01-23 00:16:31 UTC 
(rev 293861)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2010-01-23 01:37:32 UTC 
(rev 293862)
@@ -789,6 +789,7 @@

 #if LIBCURL_VERSION_NUM = 0x070f01
REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD);
+   REGISTER_CURL_CONSTANT(CURLOPT_FTP_SKIP_PASV_IP);
 #endif

 #if LIBCURL_VERSION_NUM = 0x071001
@@ -1657,6 +1658,7 @@
 #endif
 #if LIBCURL_VERSION_NUM = 0x070f01
case CURLOPT_FTP_FILEMETHOD:
+   case CURLOPT_FTP_SKIP_PASV_IP:
 #endif
 #if LIBCURL_VERSION_NUM   0x071301
case CURLOPT_CERTINFO:

Added: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_ftp_pasv.phpt
===
--- php/php-src/branches/PHP_5_3/ext/curl/tests/curl_ftp_pasv.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/curl/tests/curl_ftp_pasv.phpt  
2010-01-23 01:37:32 UTC (rev 293862)
@@ -0,0 +1,59 @@
+--TEST--
+Test curl_exec() function with basic functionality
+--CREDITS--
+--SKIPIF--
+?php
+if (!extension_loaded(curl)) exit(skip curl extension not loaded);
+if (false === getenv('PHP_CURL_FTP_REMOTE_SERVER'))  exit(skip 
PHP_CURL_FTP_REMOTE_SERVER env variable is not defined);
+if (false === getenv('PHP_CURL_FTP_REMOTE_USER'))  exit(skip 
PHP_CURL_FTP_REMOTE_USER env variable is not defined);
+if (false === getenv('PHP_CURL_FTP_REMOTE_PASSWD'))  exit(skip 
PHP_CURL_FTP_REMOTE_PASSWD env variable is not defined);
+?
+--FILE--
+?php
+  $host = getenv('PHP_CURL_FTP_REMOTE_SERVER');
+  $username = getenv('PHP_CURL_FTP_REMOTE_USER');
+  $password = getenv('PHP_CURL_FTP_REMOTE_PASSWD');
+
+  // FTP this script to a server
+  $fp  =  fopen ( __FILE__ ,  r );
+  $url  =  ftp://$username:$passw...@$host/test.phpt; ;
+
+  $ch  =  curl_init ();
+
+  // enable below to get the output in verbose mode.
+  // curl_setopt ( $ch , CURLOPT_VERBOSE, 1 );
+
+  /* Without enabling SKIP_PASV_IP flag, the following output will be seen..
+227 Entering Passive Mode (10,5,80,146,100,199)
+   *   Trying 10.5.80.146... * connected
+   * Connecting to 10.5.80.146 (10.5.80.146) port 25799
+   */
+
+  /* After enabling SKIP_PASV_IP flag, the following output will be seen..
+227 Entering Passive Mode (10,5,80,146,50,229)
+   * Skips 10.5.80.146 for data connection, uses 10.5.80.146 instead
+   *   Trying 10.5.80.146... * connected
+   */
+
+  curl_setopt ( $ch , CURLOPT_URL, $url );
+  curl_setopt ( $ch , CURLOPT_TRANSFERTEXT, 1 );
+
+  //force passive connection
+  curl_setopt ( $ch , CURLOPT_FTP_USE_EPSV, 0 );
+  curl_setopt ( $ch , CURLOPT_FTP_SKIP_PASV_IP, 1 );
+
+  // mark the file for upload..
+  curl_setopt ( $ch , CURLOPT_INFILE, $fp );
+  curl_setopt ( $ch , CURLOPT_INFILESIZE,  filesize(__FILE__) );
+  curl_setopt ( $ch , CURLOPT_PUT, 1 );
+  curl_setopt ( $ch , CURLOPT_UPLOAD, 1 );
+
+  $result  =  curl_exec ( $ch );
+  var_dump ( $result );
+  curl_close ( $ch );
+
+?
+===DONE===
+--EXPECTF--
+bool(true)
+===DONE===

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2010-01-23 00:16:31 UTC (rev 
293861)
+++ php/php-src/trunk/ext/curl/interface.c  2010-01-23 01:37:32 UTC (rev 
293862)
@@ -747,6 +747,7 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL);
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif
+
 #if LIBCURL_VERSION_NUM  0x071301
REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO);
 #endif

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/soap/php_http.c branches/PHP_5_3/ext/soap/php_http.c trunk/ext/soap/php_http.c

2010-01-05 Thread Sriram Natarajan
srinatar Tue, 05 Jan 2010 19:25:23 +

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

Log:
- Addressing minor leak noticed while addressing bug #48590

Bug: http://bugs.php.net/48590 (Closed) SOAP Client (redirect loop)
  
Changed paths:
U   php/php-src/branches/PHP_5_2/ext/soap/php_http.c
U   php/php-src/branches/PHP_5_3/ext/soap/php_http.c
U   php/php-src/trunk/ext/soap/php_http.c

Modified: php/php-src/branches/PHP_5_2/ext/soap/php_http.c
===
--- php/php-src/branches/PHP_5_2/ext/soap/php_http.c2010-01-05 17:00:02 UTC 
(rev 293151)
+++ php/php-src/branches/PHP_5_2/ext/soap/php_http.c2010-01-05 19:25:23 UTC 
(rev 293152)
@@ -709,18 +709,17 @@
smart_str_0(soap_headers);

err = php_stream_write(stream, soap_headers.c, 
soap_headers.len);
+   smart_str_free(soap_headers);
if (err != soap_headers.len) {
if (request != buf) {efree(request);}
-   smart_str_free(soap_headers);
php_stream_close(stream);
zend_hash_del(Z_OBJPROP_P(this_ptr), httpurl, 
sizeof(httpurl));
zend_hash_del(Z_OBJPROP_P(this_ptr), httpsocket, 
sizeof(httpsocket));
zend_hash_del(Z_OBJPROP_P(this_ptr), _use_proxy, 
sizeof(_use_proxy));
add_soap_fault(this_ptr, HTTP, Failed Sending HTTP 
SOAP request, NULL, NULL TSRMLS_CC);
+   smart_str_free(soap_headers_z);
return FALSE;
}
-   smart_str_free(soap_headers);
-
} else {
add_soap_fault(this_ptr, HTTP, Failed to create stream??, 
NULL, NULL TSRMLS_CC);
smart_str_free(soap_headers_z);
@@ -969,8 +968,8 @@
phpurl = new_url;

if (--redirect_max  1) {
-   smart_str_free(soap_headers_z);
add_soap_fault(this_ptr, HTTP, 
Redirection limit reached, aborting, NULL, NULL TSRMLS_CC);
+   smart_str_free(soap_headers_z);
return FALSE;
}


Modified: php/php-src/branches/PHP_5_3/ext/soap/php_http.c
===
--- php/php-src/branches/PHP_5_3/ext/soap/php_http.c2010-01-05 17:00:02 UTC 
(rev 293151)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_http.c2010-01-05 19:25:23 UTC 
(rev 293152)
@@ -759,18 +759,17 @@
smart_str_0(soap_headers);

err = php_stream_write(stream, soap_headers.c, 
soap_headers.len);
+   smart_str_free(soap_headers);
if (err != soap_headers.len) {
if (request != buf) {efree(request);}
-   smart_str_free(soap_headers);
php_stream_close(stream);
zend_hash_del(Z_OBJPROP_P(this_ptr), httpurl, 
sizeof(httpurl));
zend_hash_del(Z_OBJPROP_P(this_ptr), httpsocket, 
sizeof(httpsocket));
zend_hash_del(Z_OBJPROP_P(this_ptr), _use_proxy, 
sizeof(_use_proxy));
add_soap_fault(this_ptr, HTTP, Failed Sending HTTP 
SOAP request, NULL, NULL TSRMLS_CC);
+   smart_str_free(soap_headers_z);
return FALSE;
}
-   smart_str_free(soap_headers);
-
} else {
add_soap_fault(this_ptr, HTTP, Failed to create stream??, 
NULL, NULL TSRMLS_CC);
smart_str_free(soap_headers_z);
@@ -1022,8 +1021,8 @@
phpurl = new_url;

if (--redirect_max  1) {
-   smart_str_free(soap_headers_z);
add_soap_fault(this_ptr, HTTP, 
Redirection limit reached, aborting, NULL, NULL TSRMLS_CC);
+   smart_str_free(soap_headers_z);
return FALSE;
}


Modified: php/php-src/trunk/ext/soap/php_http.c
===
--- php/php-src/trunk/ext/soap/php_http.c   2010-01-05 17:00:02 UTC (rev 
293151)
+++ php/php-src/trunk/ext/soap/php_http.c   2010-01-05 19:25:23 UTC (rev 
293152)
@@ -764,9 +764,9 @@
smart_str_0(soap_headers);

err = php_stream_write(stream, soap_headers.c, 
soap_headers.len);
+   smart_str_free(soap_headers);
if (err != soap_headers.len) {
if (request != buf) {efree(request);}
-   smart_str_free(soap_headers);

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

2010-01-04 Thread Sriram Natarajan
srinatar Tue, 05 Jan 2010 03:07:43 +

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

Log:
- Fixed bug #48590 (SoapClient does not honor max_redirects)

Bug: http://bugs.php.net/48590 (Closed) SOAP Client (redirect loop)
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/soap/php_http.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/soap/php_http.c
U   php/php-src/trunk/ext/soap/php_http.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-01-05 02:55:24 UTC (rev 293130)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-01-05 03:07:43 UTC (rev 293131)
@@ -24,6 +24,7 @@
   (Jani)
 - Fixed bug #50394 (Reference argument converted to value in __call). (Stas)
 - Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
+- Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
 - Fixed bug #48190 (Content-type parameter boundary is not case-insensitive
   in HTTP uploads). (Ilia)
 - Fixed bug #47409 (extract() problem with array containing word this).

Modified: php/php-src/branches/PHP_5_2/ext/soap/php_http.c
===
--- php/php-src/branches/PHP_5_2/ext/soap/php_http.c2010-01-05 02:55:24 UTC 
(rev 293130)
+++ php/php-src/branches/PHP_5_2/ext/soap/php_http.c2010-01-05 03:07:43 UTC 
(rev 293131)
@@ -237,9 +237,11 @@
int http_1_1;
int http_status;
int content_type_xml = 0;
+   long redirect_max = 20;
char *content_encoding;
char *http_msg = NULL;
zend_bool old_allow_url_fopen;
+   php_stream_context *context = NULL;

if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) {
return FALSE;
@@ -307,6 +309,19 @@
phpurl = php_url_parse(location);
}

+   if (SUCCESS == zend_hash_find(Z_OBJPROP_P(this_ptr),
+   _stream_context, sizeof(_stream_context), 
(void**)tmp)) {
+   context = php_stream_context_from_zval(*tmp, 0);
+   }
+
+   if (context 
+   php_stream_context_get_option(context, http, max_redirects, 
tmp) == SUCCESS) {
+   if (Z_TYPE_PP(tmp) != IS_STRING || 
!is_numeric_string(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), redirect_max, NULL, 1)) 
{
+   if (Z_TYPE_PP(tmp) == IS_LONG)
+   redirect_max = Z_LVAL_PP(tmp);
+   }
+   }
+
 try_again:
if (phpurl == NULL || phpurl-host == NULL) {
  if (phpurl != NULL) {php_url_free(phpurl);}
@@ -953,6 +968,12 @@
}
phpurl = new_url;

+   if (--redirect_max  1) {
+   smart_str_free(soap_headers_z);
+   add_soap_fault(this_ptr, HTTP, 
Redirection limit reached, aborting, NULL, NULL TSRMLS_CC);
+   return FALSE;
+   }
+
goto try_again;
}
}

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-01-05 02:55:24 UTC (rev 293130)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-01-05 03:07:43 UTC (rev 293131)
@@ -12,6 +12,7 @@
   (Pierrick)
 - Fixed bug #50632 (filter_input() does not return default value if the
   variable does not exist). (Ilia)
+- Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
 - Fixed bug #48190 (Content-type parameter boundary is not case-insensitive
   in HTTP uploads). (Ilia)
 - Fixed bug #47409 (extract() problem with array containing word this).

Modified: php/php-src/branches/PHP_5_3/ext/soap/php_http.c
===
--- php/php-src/branches/PHP_5_3/ext/soap/php_http.c2010-01-05 02:55:24 UTC 
(rev 293130)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_http.c2010-01-05 03:07:43 UTC 
(rev 293131)
@@ -207,6 +207,7 @@
int http_1_1;
int http_status;
int content_type_xml = 0;
+   long redirect_max = 20;
char *content_encoding;
char *http_msg = NULL;
zend_bool old_allow_url_fopen;
@@ -283,6 +284,14 @@
context = php_stream_context_from_zval(*tmp, 0);
}

+   if (context 
+   php_stream_context_get_option(context, http, max_redirects, 
tmp) == SUCCESS) {
+   if (Z_TYPE_PP(tmp) != IS_STRING || 
!is_numeric_string(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), redirect_max, NULL, 1)) 
{
+   if (Z_TYPE_PP(tmp) == IS_LONG)
+   redirect_max = Z_LVAL_PP(tmp);
+   }
+ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/ldap/tests/ldap_get_entries_variation.phpt branches/PHP_5_2/ext/ldap/tests/ldap_mod_del_basic.phpt branches/PHP_5_3/ext/ldap/tests/ldap_get_entries_va

2009-12-23 Thread Sriram Natarajan
srinatar Thu, 24 Dec 2009 02:08:23 +

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

Log:
- Update tests to reflect current behavior after fix for bug #50185

Bug: http://bugs.php.net/50185 (Closed) ldap_get_entries() return false instead 
of an empty array when there is no error
  
Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_get_entries_variation.phpt
U   php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_mod_del_basic.phpt
U   
php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_get_entries_variation.phpt
U   php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_mod_del_basic.phpt
U   php/php-src/trunk/ext/ldap/tests/ldap_get_entries_variation.phpt
U   php/php-src/trunk/ext/ldap/tests/ldap_mod_del_basic.phpt

Modified: 
php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_get_entries_variation.phpt
===
--- php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_get_entries_variation.phpt 
2009-12-24 00:45:03 UTC (rev 292573)
+++ php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_get_entries_variation.phpt 
2009-12-24 02:08:23 UTC (rev 292574)
@@ -29,5 +29,8 @@
 remove_dummy_data($link);
 ?
 --EXPECT--
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

Modified: php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_mod_del_basic.phpt
===
--- php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_mod_del_basic.phpt 
2009-12-24 00:45:03 UTC (rev 292573)
+++ php/php-src/branches/PHP_5_2/ext/ldap/tests/ldap_mod_del_basic.phpt 
2009-12-24 02:08:23 UTC (rev 292574)
@@ -36,5 +36,8 @@
 ?
 --EXPECT--
 bool(true)
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

Modified: 
php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_get_entries_variation.phpt
===
--- php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_get_entries_variation.phpt 
2009-12-24 00:45:03 UTC (rev 292573)
+++ php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_get_entries_variation.phpt 
2009-12-24 02:08:23 UTC (rev 292574)
@@ -29,5 +29,8 @@
 remove_dummy_data($link);
 ?
 --EXPECT--
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

Modified: php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_mod_del_basic.phpt
===
--- php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_mod_del_basic.phpt 
2009-12-24 00:45:03 UTC (rev 292573)
+++ php/php-src/branches/PHP_5_3/ext/ldap/tests/ldap_mod_del_basic.phpt 
2009-12-24 02:08:23 UTC (rev 292574)
@@ -36,5 +36,8 @@
 ?
 --EXPECT--
 bool(true)
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

Modified: php/php-src/trunk/ext/ldap/tests/ldap_get_entries_variation.phpt
===
--- php/php-src/trunk/ext/ldap/tests/ldap_get_entries_variation.phpt
2009-12-24 00:45:03 UTC (rev 292573)
+++ php/php-src/trunk/ext/ldap/tests/ldap_get_entries_variation.phpt
2009-12-24 02:08:23 UTC (rev 292574)
@@ -29,5 +29,8 @@
 remove_dummy_data($link);
 ?
 --EXPECT--
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

Modified: php/php-src/trunk/ext/ldap/tests/ldap_mod_del_basic.phpt
===
--- php/php-src/trunk/ext/ldap/tests/ldap_mod_del_basic.phpt2009-12-24 
00:45:03 UTC (rev 292573)
+++ php/php-src/trunk/ext/ldap/tests/ldap_mod_del_basic.phpt2009-12-24 
02:08:23 UTC (rev 292574)
@@ -36,5 +36,8 @@
 ?
 --EXPECT--
 bool(true)
-NULL
+array(1) {
+  [count]=
+  int(0)
+}
 ===DONE===

-- 
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/standard/tests/strings/ htmlentities-utf.phpt

2009-12-23 Thread Sriram Natarajan
srinatar Thu, 24 Dec 2009 02:25:08 +

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

Log:
- Update test from 5.3 branch

Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities-utf.phpt

Modified: 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities-utf.phpt
===
--- 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities-utf.phpt   
2009-12-24 02:08:23 UTC (rev 292574)
+++ 
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/htmlentities-utf.phpt   
2009-12-24 02:25:08 UTC (rev 292575)
@@ -4,8 +4,12 @@
 output_handler=
 --FILE--
 ?php
-setlocale (LC_CTYPE, C);
-$strings = array(, \xD0, \xD0\x90, \xD0\x90\xD0, \xD0\x90\xD0\xB0, 
\xE0, A\xE0, \xE0\x80, \xE0\x80\xBE);
+...@setlocale (LC_CTYPE, C);
+$strings = array(b, b\xD0, b\xD0\x90, b\xD0\x90\xD0, 
b\xD0\x90\xD0\xB0, b\xE0, bA\xE0, b\xE0\x80, b\xE0\x79, 
b\xE0\x80\xBE,
+   bVoil\xE0, bClich\xE9s,
+   b\xFE, b\xFE\x41, b\xC3\xA9, b\xC3\x79, b\xF7\xBF\xBF\xBF, 
b\xFB\xBF\xBF\xBF\xBF, b\xFD\xBF\xBF\xBF\xBF\xBF,
+   b\x41\xF7\xF7\x42, b\x42\xFB\xFB\x42, b\x43\xFD\xFD\x42, 
b\x44\xF7\xF7, b\x45\xFB\xFB, b\x46\xFD\xFD
+   );
 foreach($strings as $string) {
$sc_encoded = htmlspecialchars ($string, ENT_QUOTES, utf-8);
var_dump(bin2hex($sc_encoded));
@@ -13,22 +17,54 @@
var_dump(bin2hex($ent_encoded));
 }
 ?
---EXPECT--
-string(8) 266c743b
-string(8) 266c743b
-string(0) 
-string(0) 
-string(4) d090
-string(4) d090
-string(0) 
-string(0) 
-string(8) d090d0b0
-string(8) d090d0b0
-string(0) 
-string(0) 
-string(0) 
-string(0) 
-string(0) 
-string(0) 
-string(8) 2667743b
-string(8) 2667743b
\ No newline at end of file
+--EXPECTF--
+%unicode|string%(8) 266c743b
+%unicode|string%(8) 266c743b
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(4) d090
+%unicode|string%(4) d090
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(8) d090d0b0
+%unicode|string%(8) d090d0b0
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(4) c3a9
+%unicode|string%(16) 266561637574653b
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(8) f7bfbfbf
+%unicode|string%(8) f7bfbfbf
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 
+%unicode|string%(0) 

-- 
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/ldap/ldap.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/ldap/ldap.c trunk/ext/ldap/ldap.c

2009-12-22 Thread Sriram Natarajan
srinatar Mon, 21 Dec 2009 20:39:48 +

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

Log:
Fixed bug #50540 (Crash within ldap_first_reference function)

Bug: http://bugs.php.net/50540 (Open) Segmentation fault while running 
ldap_next_reference 
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/ldap/ldap.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/ldap/ldap.c
U   php/php-src/trunk/ext/ldap/ldap.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-12-21 20:37:44 UTC (rev 292436)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-12-21 20:39:48 UTC (rev 292437)
@@ -3,6 +3,8 @@
 ?? ??? 2010, PHP 5.2.13
 - Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)

+- Fixed bug #50540 (Crash while running ldap_next_reference test cases).
+  (Sriram)
 - Fixed bug #50508 (compile failure: Conflicting HEADER type declarations).
   (Jani)
 - Fixed bug #50394 (Reference argument converted to value in __call). (Stas)

Modified: php/php-src/branches/PHP_5_2/ext/ldap/ldap.c
===
--- php/php-src/branches/PHP_5_2/ext/ldap/ldap.c2009-12-21 20:37:44 UTC 
(rev 292436)
+++ php/php-src/branches/PHP_5_2/ext/ldap/ldap.c2009-12-21 20:39:48 UTC 
(rev 292437)
@@ -2009,6 +2009,7 @@
resultentry-id = Z_LVAL_PP(result);
zend_list_addref(resultentry-id);
resultentry-data = entry;
+   resultentry-ber = NULL;
}
 }
 /* }}} */
@@ -2037,6 +2038,7 @@
resultentry_next-id = resultentry-id;
zend_list_addref(resultentry-id);
resultentry_next-data = entry_next;
+   resultentry_next-ber = NULL;
}
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-21 20:37:44 UTC (rev 292436)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-21 20:39:48 UTC (rev 292437)
@@ -35,6 +35,8 @@
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)

+- Fixed bug #50540 (Crash while running ldap_next_reference test cases).
+  (Sriram)
 - Fixed bug #50508 (compile failure: Conflicting HEADER type declarations).
   (Jani)
 - Fixed bug #50496 (Use of stdbool.h is valid only in a c99 compilation

Modified: php/php-src/branches/PHP_5_3/ext/ldap/ldap.c
===
--- php/php-src/branches/PHP_5_3/ext/ldap/ldap.c2009-12-21 20:37:44 UTC 
(rev 292436)
+++ php/php-src/branches/PHP_5_3/ext/ldap/ldap.c2009-12-21 20:39:48 UTC 
(rev 292437)
@@ -1911,6 +1911,7 @@
resultentry-id = Z_LVAL_P(result);
zend_list_addref(resultentry-id);
resultentry-data = entry;
+   resultentry-ber = NULL;
}
 }
 /* }}} */
@@ -1939,6 +1940,7 @@
resultentry_next-id = resultentry-id;
zend_list_addref(resultentry-id);
resultentry_next-data = entry_next;
+   resultentry_next-ber = NULL;
}
 }
 /* }}} */

Modified: php/php-src/trunk/ext/ldap/ldap.c
===
--- php/php-src/trunk/ext/ldap/ldap.c   2009-12-21 20:37:44 UTC (rev 292436)
+++ php/php-src/trunk/ext/ldap/ldap.c   2009-12-21 20:39:48 UTC (rev 292437)
@@ -1965,6 +1965,7 @@
resultentry-id = Z_LVAL_P(result);
zend_list_addref(resultentry-id);
resultentry-data = entry;
+   resultentry-ber = NULL;
}
 }
 /* }}} */
@@ -1993,6 +1994,7 @@
resultentry_next-id = resultentry-id;
zend_list_addref(resultentry-id);
resultentry_next-data = entry_next;
+   resultentry_next-ber = NULL;
}
 }
 /* }}} */

-- 
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/configure.in trunk/configure.in

2009-12-16 Thread Sriram Natarajan
srinatar Wed, 16 Dec 2009 20:49:08 +

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

Log:
- Fixed bug #50496 (Use of stdbool.h is valid only in a c99 compilation 
environment.)

Bug: http://bugs.php.net/50496 (Assigned) Use of stdbool.h is valid only in a 
c99 compilation environment.
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/trunk/configure.in

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-16 20:01:00 UTC (rev 292221)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-16 20:49:08 UTC (rev 29)
@@ -9,6 +9,8 @@
 - Changed post_max_size php.ini directive to allow unlimited post size by
   setting it to 0. (Rasmus)

+- Fixed bug #50496 (Use of stdbool.h is valid only in a c99 compilation
+  environment. (Sriram)
 - Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)
 - Added realpath_cache_size() and realpath_cache_get() functions. (Stas)
 - Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2009-12-16 20:01:00 UTC (rev 
292221)
+++ php/php-src/branches/PHP_5_3/configure.in   2009-12-16 20:49:08 UTC (rev 
29)
@@ -202,9 +202,14 @@
 ;;
   sparc*)
 if test $SUNCC = yes; then
-  CFLAGS=$CFLAGS -xmemalign=8s
+  CFLAGS=$CFLAGS -xc99=all -xmemalign=8s
 fi
 ;;
+  i386)
+if test $SUNCC = yes; then
+  CFLAGS=$CFLAGS -xc99=all
+fi
+;;
 esac

 dnl activate some gcc specific optimizations for gcc = 4

Modified: php/php-src/trunk/configure.in
===
--- php/php-src/trunk/configure.in  2009-12-16 20:01:00 UTC (rev 292221)
+++ php/php-src/trunk/configure.in  2009-12-16 20:49:08 UTC (rev 29)
@@ -204,9 +204,13 @@
 ;;
   sparc*)
 if test $SUNCC = yes; then
-  CFLAGS=$CFLAGS -xmemalign=8s
+  CFLAGS=$CFLAGS -xc99=all -xmemalign=8s
 fi
 ;;
+  i386)
+if test $SUNCC = yes; then
+  CFLAGS=$CFLAGS -xc99=all
+fi
 esac

 dnl activate some gcc specific optimizations for gcc = 4

-- 
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-12-16 Thread Sriram Natarajan
srinatar Wed, 16 Dec 2009 21:33:20 +

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

Log:
- Fix NEWS for bug #50496
# Update NEWS to keep resolved bugs in decreasing order (Christopher Jones)

Bug: http://bugs.php.net/50496 (Assigned) Use of stdbool.h is valid only in a 
c99 compilation environment.
  
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-12-16 20:49:08 UTC (rev 29)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-16 21:33:20 UTC (rev 292223)
@@ -9,8 +9,6 @@
 - Changed post_max_size php.ini directive to allow unlimited post size by
   setting it to 0. (Rasmus)

-- Fixed bug #50496 (Use of stdbool.h is valid only in a c99 compilation
-  environment. (Sriram)
 - Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)
 - Added realpath_cache_size() and realpath_cache_get() functions. (Stas)
 - Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia)
@@ -35,6 +33,8 @@
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)

+- Fixed bug #50496 (Use of stdbool.h is valid only in a c99 compilation
+  environment. (Sriram)
 - Fixed bug #50464 (declare encoding doesn't work within an included file).
   (Felipe)
 - Fixed bug #50458 (PDO::FETCH_FUNC fails with Closures). (Felipe, Pierrick)

-- 
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

2009-12-07 Thread Sriram Natarajan
srinatar Mon, 07 Dec 2009 20:13:16 +

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

Log:
- Fix NEWS (48752 not relevant for 5.2 release)

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-12-07 19:43:39 UTC (rev 291831)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-12-07 20:13:16 UTC (rev 291832)
@@ -101,7 +101,6 @@
   (Moriyoshi, hello at iwamot dot com)
 - Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
   applications). (Ilia, Florian Anderiasch)
-- Fixed bug #48752 (Crash during date parsing with invalid date). (Pierre)
 - Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes).
   (Sriram Natarajan)
 - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private

-- 
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-12-06 Thread Sriram Natarajan
srinatar Sun, 06 Dec 2009 16:43:46 +

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

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-12-06 15:48:04 UTC (rev 291769)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-06 16:43:46 UTC (rev 291770)
@@ -19,6 +19,8 @@
   (Linus Nielsen Feltzing li...@haxx.se)
 - Added client-side server name indication support in openssl. (Arnaud)

+- Protect http_session_vars from interrupt corruption and improve save_path
+  check. (Stas)
 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)

 - Fixed incorrect decoding of 5-byte BIT sequences in mysqlnd. (Andrey)

-- 
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/mcrypt/mcrypt.c branches/PHP_5_2/ext/mcrypt/tests/bug49738.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mcrypt/mcrypt.c branc

2009-10-01 Thread Sriram Natarajan
srinatar Fri, 02 Oct 2009 00:13:53 +

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

Log:
- Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes).

Bug: http://bugs.php.net/49738 (Open) calling mcrypt after 
mcrypt_generic_deinit crashes
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/mcrypt/mcrypt.c
A   php/php-src/branches/PHP_5_2/ext/mcrypt/tests/bug49738.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c
A   php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug49738.phpt
U   php/php-src/trunk/ext/mcrypt/mcrypt.c
A   php/php-src/trunk/ext/mcrypt/tests/bug49738.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-10-01 23:51:33 UTC (rev 289075)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-10-02 00:13:53 UTC (rev 289076)
@@ -20,6 +20,8 @@
 - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
   (Moriyoshi)
 - Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
+- Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes).
+  (Sriram Natarajan)

 17 Sep 2009, PHP 5.2.11
 - Fixed certificate validation inside php_openssl_apply_verification_policy.

Modified: php/php-src/branches/PHP_5_2/ext/mcrypt/mcrypt.c
===
--- php/php-src/branches/PHP_5_2/ext/mcrypt/mcrypt.c2009-10-01 23:51:33 UTC 
(rev 289075)
+++ php/php-src/branches/PHP_5_2/ext/mcrypt/mcrypt.c2009-10-02 00:13:53 UTC 
(rev 289076)
@@ -613,6 +613,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
terminate encryption specifier);
RETURN_FALSE
}
+   pm-init = 0;
RETURN_TRUE
 }
 /* }}} */

Added: php/php-src/branches/PHP_5_2/ext/mcrypt/tests/bug49738.phpt
===
--- php/php-src/branches/PHP_5_2/ext/mcrypt/tests/bug49738.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/mcrypt/tests/bug49738.phpt 2009-10-02 
00:13:53 UTC (rev 289076)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes)
+--SKIPIF--
+?php if (!extension_loaded(mcrypt)) print skip; ?
+--FILE--
+?php
+   $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
+   mcrypt_generic_init($td, '', '');
+   mcrypt_generic_deinit($td);
+   echo mcrypt_generic($td, '');
+?
+--EXPECTF--
+Warning: mcrypt_generic(): Operation disallowed prior to 
mcrypt_generic_init(). in %sbug49738.php on line 5

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-10-01 23:51:33 UTC (rev 289075)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-10-02 00:13:53 UTC (rev 289076)
@@ -25,6 +25,8 @@
 - Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
 - Fixed PECL bug #16842 (oci_error return false when NO_DATA_FOUND is raised).
   (Chris Jones)
+- Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes).
+  (Sriram Natarajan)


 ?? ??? 2009, PHP 5.3.1RC?

Modified: php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c
===
--- php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c2009-10-01 23:51:33 UTC 
(rev 289075)
+++ php/php-src/branches/PHP_5_3/ext/mcrypt/mcrypt.c2009-10-02 00:13:53 UTC 
(rev 289076)
@@ -780,6 +780,7 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
terminate encryption specifier);
RETURN_FALSE
}
+   pm-init = 0;
RETURN_TRUE
 }
 /* }}} */

Added: php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug49738.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug49738.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/mcrypt/tests/bug49738.phpt 2009-10-02 
00:13:53 UTC (rev 289076)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes)
+--SKIPIF--
+?php if (!extension_loaded(mcrypt)) print skip; ?
+--FILE--
+?php
+   $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
+   mcrypt_generic_init($td, '', '');
+   mcrypt_generic_deinit($td);
+   echo mcrypt_generic($td, '');
+?
+--EXPECTF--
+Warning: mcrypt_generic(): Operation disallowed prior to 
mcrypt_generic_init(). in %sbug49738.php on line 5

Modified: php/php-src/trunk/ext/mcrypt/mcrypt.c
===
--- php/php-src/trunk/ext/mcrypt/mcrypt.c   2009-10-01 23:51:33 UTC (rev 
289075)
+++ php/php-src/trunk/ext/mcrypt/mcrypt.c   2009-10-02 00:13:53 UTC (rev 
289076

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c

2009-09-24 Thread Sriram Natarajan
srinatar Thu, 24 Sep 2009 18:20:49 +

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

Log:
- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).

Bug: http://bugs.php.net/49571 (Feedback) CURLOPT_POSTREDIR not implemented
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-24 18:01:17 UTC (rev 288676)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-24 18:20:49 UTC (rev 288677)
@@ -12,6 +12,8 @@
   of a multibyte character). (Moriyoshi)
 - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted).
   (Moriyoshi)
+- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).
+  (Sriram Natarajan)

 17 Sep 2009, PHP 5.2.11
 - Fixed certificate validation inside php_openssl_apply_verification_policy.

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-24 18:01:17 UTC 
(rev 288676)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-24 18:20:49 UTC 
(rev 288677)
@@ -649,6 +649,10 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif

+#if LIBCURL_VERSION_NUM  0x071301
+   REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+#endif
+
 #if LIBCURL_VERSION_NUM = 0x071304
REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
@@ -1381,6 +1385,12 @@
}
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;
+#if LIBCURL_VERSION_NUM  0x071301
+   case CURLOPT_POSTREDIR:
+   convert_to_long_ex(zvalue);
+   error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, 
Z_LVAL_PP(zvalue)  CURL_REDIR_POST_ALL);
+   break;
+#endif
case CURLOPT_PRIVATE:
case CURLOPT_URL:
case CURLOPT_PROXY:

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-09-24 18:01:17 UTC (rev 288676)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-09-24 18:20:49 UTC (rev 288677)
@@ -10,6 +10,8 @@
 - Fixed bug #49630 (imap_listscan function missing). (Felipe)
 - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE
   cannot be set). (Felipe)
+- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).
+  (Sriram Natarajan)


 ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 
or what??

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-09-24 18:01:17 UTC 
(rev 288676)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-09-24 18:20:49 UTC 
(rev 288677)
@@ -747,8 +747,10 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL);
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif
+
 #if LIBCURL_VERSION_NUM  0x071301
REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO);
+   REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
 #endif

 /* SSH support works in 7.19.0+ using libssh2 */
@@ -1669,6 +1671,12 @@
}
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;
+#if LIBCURL_VERSION_NUM  0x071301
+   case CURLOPT_POSTREDIR:
+   convert_to_long_ex(zvalue);
+   error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, 
Z_LVAL_PP(zvalue)  CURL_REDIR_POST_ALL);
+   break;
+#endif
case CURLOPT_PRIVATE:
case CURLOPT_URL:
case CURLOPT_PROXY:

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2009-09-24 18:01:17 UTC (rev 
288676)
+++ php/php-src/trunk/ext/curl/interface.c  2009-09-24 18:20:49 UTC (rev 
288677)
@@ -767,6 +767,10 @@
REGISTER_CURL_CONSTANT(CURLE_SSH);
 #endif

+#if LIBCURL_VERSION_NUM  0x071301
+   REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+#endif
+
 #if LIBCURL_VERSION_NUM = 0x071304
REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
@@ -1685,6 +1689,12 @@
}
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;
+#if LIBCURL_VERSION_NUM  0x071301
+   case

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS ext/curl/interface.c

2009-09-24 Thread Sriram Natarajan
srinatar Thu, 24 Sep 2009 18:45:09 +

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

Log:
- Rollback fix for bug #49571 (CURLOPT_POSTREDIR not implemented).
# - Features don't go into PHP 5.2

Bug: http://bugs.php.net/49571 (To be documented) CURLOPT_POSTREDIR not 
implemented
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-24 18:20:49 UTC (rev 288677)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-24 18:45:09 UTC (rev 288678)
@@ -12,8 +12,6 @@
   of a multibyte character). (Moriyoshi)
 - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted).
   (Moriyoshi)
-- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).
-  (Sriram Natarajan)

 17 Sep 2009, PHP 5.2.11
 - Fixed certificate validation inside php_openssl_apply_verification_policy.

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-24 18:20:49 UTC 
(rev 288677)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-09-24 18:45:09 UTC 
(rev 288678)
@@ -649,10 +649,6 @@
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
 #endif

-#if LIBCURL_VERSION_NUM  0x071301
-   REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
-#endif
-
 #if LIBCURL_VERSION_NUM = 0x071304
REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
@@ -1385,12 +1381,6 @@
}
error = curl_easy_setopt(ch-cp, option, 
Z_LVAL_PP(zvalue));
break;
-#if LIBCURL_VERSION_NUM  0x071301
-   case CURLOPT_POSTREDIR:
-   convert_to_long_ex(zvalue);
-   error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, 
Z_LVAL_PP(zvalue)  CURL_REDIR_POST_ALL);
-   break;
-#endif
case CURLOPT_PRIVATE:
case CURLOPT_URL:
case CURLOPT_PROXY:

-- 
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/main/streams/memory.c branches/PHP_5_3/NEWS branches/PHP_5_3/main/streams/memory.c trunk/main/streams/memory.c

2009-09-16 Thread Sriram Natarajan
srinatar Thu, 17 Sep 2009 02:45:25 +

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

Log:
- Fixed bug #49572 (use of C++ style comments causes build failure)

Bug: http://bugs.php.net/49572 (Assigned) use of C++ style  comments causes 
build failure
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/main/streams/memory.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/streams/memory.c
U   php/php-src/trunk/main/streams/memory.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-17 02:44:10 UTC (rev 288392)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-17 02:45:25 UTC (rev 288393)
@@ -125,6 +125,8 @@
 - Fixed bug #42434 (ImageLine w/ antialias = 1px shorter).
   (wojjie at gmail dot com, Kalle)
 - Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
+- Fixed bug #49572 (use of C++ style comments causes build failure).
+  (Sriram Natarajan)

 17 Jun 2009, PHP 5.2.10
 - Added ignore_errors option to http fopen wrapper. (David Zulke, Sara)

Modified: php/php-src/branches/PHP_5_2/main/streams/memory.c
===
--- php/php-src/branches/PHP_5_2/main/streams/memory.c  2009-09-17 02:44:10 UTC 
(rev 288392)
+++ php/php-src/branches/PHP_5_2/main/streams/memory.c  2009-09-17 02:45:25 UTC 
(rev 288393)
@@ -563,7 +563,7 @@
stream = php_stream_alloc_rel(php_stream_temp_ops, self, 0, mode  
TEMP_STREAM_READONLY ? rb : w+b);
stream-flags |= PHP_STREAM_FLAG_NO_BUFFER;
self-innerstream = php_stream_memory_create_rel(mode);
-   php_stream_auto_cleanup(self-innerstream); // do not warn if 
innerstream is GC'ed before stream
+   php_stream_auto_cleanup(self-innerstream); /* do not warn if 
innerstream is GC'ed before stream */
((php_stream_memory_data*)self-innerstream-abstract)-owner_ptr = 
self-innerstream;

return stream;

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-09-17 02:44:10 UTC (rev 288392)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-09-17 02:45:25 UTC (rev 288393)
@@ -16,6 +16,8 @@
   (Ryan Sleevi, Ilia)
 - Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters).
   (Ilia)
+- Fixed bug #49572 (use of C++ style comments causes build failure).
+  (Sriram Natarajan)


 ?? ??? 2009, PHP 5.3.1

Modified: php/php-src/branches/PHP_5_3/main/streams/memory.c
===
--- php/php-src/branches/PHP_5_3/main/streams/memory.c  2009-09-17 02:44:10 UTC 
(rev 288392)
+++ php/php-src/branches/PHP_5_3/main/streams/memory.c  2009-09-17 02:45:25 UTC 
(rev 288393)
@@ -563,7 +563,7 @@
stream = php_stream_alloc_rel(php_stream_temp_ops, self, 0, mode  
TEMP_STREAM_READONLY ? rb : w+b);
stream-flags |= PHP_STREAM_FLAG_NO_BUFFER;
self-innerstream = php_stream_memory_create_rel(mode);
-   php_stream_auto_cleanup(self-innerstream); // do not warn if 
innerstream is GC'ed before stream
+   php_stream_auto_cleanup(self-innerstream); /* do not warn if 
innerstream is GC'ed before stream */
((php_stream_memory_data*)self-innerstream-abstract)-owner_ptr = 
self-innerstream;

return stream;

Modified: php/php-src/trunk/main/streams/memory.c
===
--- php/php-src/trunk/main/streams/memory.c 2009-09-17 02:44:10 UTC (rev 
288392)
+++ php/php-src/trunk/main/streams/memory.c 2009-09-17 02:45:25 UTC (rev 
288393)
@@ -563,7 +563,7 @@
stream = php_stream_alloc_rel(php_stream_temp_ops, self, 0, mode  
TEMP_STREAM_READONLY ? rb : w+b);
stream-flags |= PHP_STREAM_FLAG_NO_BUFFER;
self-innerstream = php_stream_memory_create_rel(mode);
-   php_stream_auto_cleanup(self-innerstream); // do not warn if 
innerstream is GC'ed before stream
+   php_stream_auto_cleanup(self-innerstream); /* do not warn if 
innerstream is GC'ed before stream */
((php_stream_memory_data*)self-innerstream-abstract)-owner_ptr = 
self-innerstream;

return stream;

-- 
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/ftp/ftp.c branches/PHP_5_2/ext/openssl/xp_ssl.c branches/PHP_5_2/ext/sockets/sockets.c branches/PHP_5_2/main/network.c branches/

2009-09-04 Thread Sriram Natarajan
srinatar Fri, 04 Sep 2009 07:59:48 +

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

Log:
- Fixed bug #49447 (php engine need to correctly check for socket API
  return status on windows). (Sriram Natarajan)

Bug: http://bugs.php.net/49447 (Assigned) php engine need to correctly check 
for socket API return status on windows
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/ftp/ftp.c
U   php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
U   php/php-src/branches/PHP_5_2/ext/sockets/sockets.c
U   php/php-src/branches/PHP_5_2/main/network.c
U   php/php-src/branches/PHP_5_2/main/streams/xp_socket.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/ftp/ftp.c
U   php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c
U   php/php-src/branches/PHP_5_3/ext/sockets/sockets.c
U   php/php-src/branches/PHP_5_3/main/network.c
U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
U   php/php-src/trunk/ext/ftp/ftp.c
U   php/php-src/trunk/ext/openssl/xp_ssl.c
U   php/php-src/trunk/ext/sockets/sockets.c
U   php/php-src/trunk/main/network.c
U   php/php-src/trunk/main/streams/xp_socket.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-09-04 07:57:24 UTC (rev 288033)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-09-04 07:59:48 UTC (rev 288034)
@@ -2,6 +2,8 @@
 |||
 0? Sep 2009, PHP 5.2.11
 - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
+- Fixed bug #49447 (php engine need to correctly check for socket API
+  return status on windows). (Sriram Natarajan)


 03 Sep 2009, PHP 5.2.11RC2

Modified: php/php-src/branches/PHP_5_2/ext/ftp/ftp.c
===
--- php/php-src/branches/PHP_5_2/ext/ftp/ftp.c	2009-09-04 07:57:24 UTC (rev 288033)
+++ php/php-src/branches/PHP_5_2/ext/ftp/ftp.c	2009-09-04 07:59:48 UTC (rev 288034)
@@ -147,7 +147,7 @@

 	size = sizeof(ftp-localaddr);
 	memset(ftp-localaddr, 0, size);
-	if (getsockname(ftp-fd, (struct sockaddr*) ftp-localaddr, size) == -1) {
+	if (getsockname(ftp-fd, (struct sockaddr*) ftp-localaddr, size) != 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname failed: %s (%d), strerror(errno), errno);
 		goto bail;
 	}
@@ -1387,7 +1387,7 @@

 	sa = (struct sockaddr *) ftp-localaddr;
 	/* bind/listen */
-	if ((fd = socket(sa-sa_family, SOCK_STREAM, 0)) == -1) {
+	if ((fd = socket(sa-sa_family, SOCK_STREAM, 0)) == SOCK_ERR) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, socket() failed: %s (%d), strerror(errno), errno);
 		goto bail;
 	}
@@ -1420,17 +1420,17 @@
 	php_any_addr(sa-sa_family, addr, 0);
 	size = php_sockaddr_size(addr);

-	if (bind(fd, (struct sockaddr*) addr, size) == -1) {
+	if (bind(fd, (struct sockaddr*) addr, size) != 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, bind() failed: %s (%d), strerror(errno), errno);
 		goto bail;
 	}

-	if (getsockname(fd, (struct sockaddr*) addr, size) == -1) {
+	if (getsockname(fd, (struct sockaddr*) addr, size) != 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, getsockname() failed: %s (%d), strerror(errno), errno);
 		goto bail;
 	}

-	if (listen(fd, 5) == -1) {
+	if (listen(fd, 5) != 0) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, listen() failed: %s (%d), strerror(errno), errno);
 		goto bail;
 	}

Modified: php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
===
--- php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-09-04 07:57:24 UTC (rev 288033)
+++ php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-09-04 07:59:48 UTC (rev 288034)
@@ -272,6 +272,10 @@
 			SSL_CTX_free(sslsock-ctx);
 			sslsock-ctx = NULL;
 		}
+#ifdef PHP_WIN32
+		if (sslsock-s.socket == -1)
+			sslsock-s.socket = SOCK_ERR;
+#endif
 		if (sslsock-s.socket != SOCK_ERR) {
 #ifdef PHP_WIN32
 			/* prevent more data from coming in */

Modified: php/php-src/branches/PHP_5_2/ext/sockets/sockets.c
===
--- php/php-src/branches/PHP_5_2/ext/sockets/sockets.c	2009-09-04 07:57:24 UTC (rev 288033)
+++ php/php-src/branches/PHP_5_2/ext/sockets/sockets.c	2009-09-04 07:59:48 UTC (rev 288034)
@@ -228,14 +228,14 @@

 	sock-type = PF_INET;

-	if (bind(sock-bsd_socket, (struct sockaddr *)la, sizeof(la))  0) {
+	if (bind(sock-bsd_socket, (struct sockaddr *)la, sizeof(la)) != 0) {
 		PHP_SOCKET_ERROR(sock, unable to bind to given address, errno);
 		close(sock-bsd_socket);
 		efree(sock);
 		return 0;
 	}

-	if (listen(sock-bsd_socket, backlog)  0) {
+	if (listen(sock-bsd_socket, backlog) != 0) {
 		PHP_SOCKET_ERROR(sock, unable to listen on socket, errno);
 		close(sock-bsd_socket

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/acinclude.m4 branches/PHP_5_3/acinclude.m4 trunk/acinclude.m4

2009-08-11 Thread Sriram Natarajan
srinatar Tue, 11 Aug 2009 23:45:35 +

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

Log:
- Simplify default flags for Sun C compiler.

Changed paths:
U   php/php-src/branches/PHP_5_2/acinclude.m4
U   php/php-src/branches/PHP_5_3/acinclude.m4
U   php/php-src/trunk/acinclude.m4

Modified: php/php-src/branches/PHP_5_2/acinclude.m4
===
--- php/php-src/branches/PHP_5_2/acinclude.m4   2009-08-11 23:05:13 UTC (rev 
287125)
+++ php/php-src/branches/PHP_5_2/acinclude.m4   2009-08-11 23:45:35 UTC (rev 
287126)
@@ -2780,7 +2780,7 @@
 AC_MSG_RESULT([no]),
 SUNCC=yes
 GCC=no
-test -n $auto_cflags  CFLAGS=-fsimple=2 -xnorunpath -xO4 
-xalias_level=basic -xipo=1 -xlibmopt -xprefetch_level=1 -xprefetch=auto 
-xstrconst -xtarget=native -zlazyload
+test -n $auto_cflags  CFLAGS=-O -xs -xstrconst -zlazyload
 GCC=
 AC_MSG_RESULT([yes])
   )

Modified: php/php-src/branches/PHP_5_3/acinclude.m4
===
--- php/php-src/branches/PHP_5_3/acinclude.m4   2009-08-11 23:05:13 UTC (rev 
287125)
+++ php/php-src/branches/PHP_5_3/acinclude.m4   2009-08-11 23:45:35 UTC (rev 
287126)
@@ -2780,7 +2780,7 @@
 AC_MSG_RESULT([no]),
 SUNCC=yes
 GCC=no
-test -n $auto_cflags  CFLAGS=-fsimple=2 -xnorunpath -xO4 
-xalias_level=basic -xipo=1 -xlibmopt -xprefetch_level=1 -xprefetch=auto 
-xstrconst -xtarget=native -zlazyload
+test -n $auto_cflags  CFLAGS=-O -xs -xstrconst -zlazyload
 GCC=
 AC_MSG_RESULT([yes])
   )

Modified: php/php-src/trunk/acinclude.m4
===
--- php/php-src/trunk/acinclude.m4  2009-08-11 23:05:13 UTC (rev 287125)
+++ php/php-src/trunk/acinclude.m4  2009-08-11 23:45:35 UTC (rev 287126)
@@ -2780,7 +2780,7 @@
 AC_MSG_RESULT([no]),
 SUNCC=yes
 GCC=no
-test -n $auto_cflags  CFLAGS=-fsimple=2 -xnorunpath -xO4 
-xalias_level=basic -xipo=1 -xlibmopt -xprefetch_level=1 -xprefetch=auto 
-xstrconst -xtarget=native -zlazyload
+test -n $auto_cflags  CFLAGS=-O -xs -xstrconst -zlazyload
 GCC=
 AC_MSG_RESULT([yes])
   )

-- 
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/openssl/tests/bug48182.phpt branches/PHP_5_2/ext/openssl/xp_ssl.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/tests/bug48

2009-07-28 Thread Sriram Natarajan
srinatar Tue, 28 Jul 2009 19:28:08 +

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

Log:
- 48182 ssl handshake fails during asynchronous socket connection

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
A   php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c
A   php/php-src/trunk/ext/openssl/tests/bug48182.phpt
U   php/php-src/trunk/ext/openssl/xp_ssl.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-07-28 19:16:02 UTC (rev 286464)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-07-28 19:28:08 UTC (rev 286465)
@@ -65,6 +65,8 @@
   (Paul Richards, Kalle)
 - Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
   (Sriram Natarajan)
+- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
+  (Sriram Natarajan)

 17 Jun 2009, PHP 5.2.10
 - Updated timezone database to version 2009.9 (2009i) (Derick)

Added: php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt
===
--- php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt	2009-07-28 19:28:08 UTC (rev 286465)
@@ -0,0 +1,92 @@
+--TEST--
+#48182,ssl handshake fails during asynchronous socket connection
+--SKIPIF--
+?php
+if (!extension_loaded(openssl)) die(skip, openssl required);
+if (!extension_loaded(pcntl)) die(skip, pcntl required);
+if (OPENSSL_VERSION_NUMBER  0x009070af) die(skip);
+?
+--FILE--
+?php
+
+function ssl_server($port) {
+	$host = 'ssl://127.0.0.1'.':'.$port;
+	$flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
+	$data = Sending bug48182\n;
+
+	$pem = dirname(__FILE__) . '/bug46127.pem';
+	$ssl_params = array( 'verify_peer' = false, 'allow_self_signed' = true, 'local_cert' = $pem);
+	$ssl = array('ssl' = $ssl_params);
+
+	$context = stream_context_create($ssl);
+	$sock = stream_socket_server($host, $errno, $errstr, $flags, $context);
+	if (!$sock) return false;
+
+	$link = stream_socket_accept($sock);
+	if (!$link) return false; // bad link?
+
+	$r = array($link);
+	$w = array();
+	$e = array();
+	if (stream_select($r, $w, $e, 0, 1000) != 0)
+		$data .= fread($link, 8192);
+
+	$r = array();
+	$w = array($link);
+	if (stream_select($r, $w, $e, 0, 1000) != 0)
+		$wrote = fwrite($link, $data, strlen($data));
+
+	// close stuff
+	fclose($link);
+	fclose($sock);
+
+	exit;
+}
+
+function ssl_async_client($port) {
+	$host = 'ssl://127.0.0.1'.':'.$port;
+	$flags = STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT;
+	$data = Sending data over to SSL server in async mode with contents like Hello World\n;
+
+	$socket = stream_socket_client($host, $errno, $errstr, 10, $flags);
+	stream_set_blocking($socket, 0);
+
+	while ($data) {
+		$wrote = fwrite($socket, $data, strlen($data));
+		$data = substr($data, $wrote);
+	}
+
+	$r = array($socket);
+	$w = array();
+	$e = array();
+	if (stream_select($r, $w, $e, 0, 10) != 0)
+	{
+		$data .= fread($socket, 1024);
+	}
+
+	echo $data;
+
+	fclose($socket);
+}
+
+echo Running bug48182\n;
+
+$port = rand(15000, 32000);
+
+$pid = pcntl_fork();
+if ($pid == 0) { // child
+	ssl_server($port);
+	exit;
+}
+
+// client or failed
+sleep(1);
+ssl_async_client($port);
+
+pcntl_waitpid($pid, $status);
+
+?
+--EXPECTF--
+Running bug48182
+Sending bug48182
+Sending data over to SSL server in async mode with contents like Hello World

Modified: php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
===
--- php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-07-28 19:16:02 UTC (rev 286464)
+++ php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-07-28 19:28:08 UTC (rev 286465)
@@ -685,7 +685,11 @@
 	 * we notice that the connect has actually been established */
 	php_stream_socket_ops.set_option(stream, option, value, ptrparam TSRMLS_CC);

-	if (xparam-outputs.returncode == 0  sslsock-enable_on_connect) {
+	if ((sslsock-enable_on_connect) 
+		((xparam-outputs.returncode == 0) ||
+		(xparam-op == STREAM_XPORT_OP_CONNECT_ASYNC 
+		xparam-outputs.returncode == 1  xparam-outputs.error_code == EINPROGRESS)))
+	{
 		if (php_stream_xport_crypto_setup(stream, sslsock-method, NULL TSRMLS_CC)  0 ||
 php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC)  0) {
 			php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to enable crypto);

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-07-28 19:16:02 UTC (rev 286464)
+++ php

[PHP-CVS] svn: php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_2/ext/curl/php_curl.h branches/PHP_5_2/ext/curl/tests/curl_copy_handle_basic_007.phpt branches/PH

2009-07-21 Thread Sriram Natarajan
srinatar Tue, 21 Jul 2009 20:32:32 +

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

Log:
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).

Bug: http://bugs.php.net/48774 (Assigned) SIGSEGVs when using curl_copy_handle()
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
U   php/php-src/branches/PHP_5_2/ext/curl/php_curl.h
A   
php/php-src/branches/PHP_5_2/ext/curl/tests/curl_copy_handle_basic_007.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/branches/PHP_5_3/ext/curl/php_curl.h
A   
php/php-src/branches/PHP_5_3/ext/curl/tests/curl_copy_handle_basic_007.phpt
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/php_curl.h
A   php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_007.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-07-21 20:11:28 UTC (rev 284556)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-07-21 20:32:32 UTC (rev 284557)
@@ -51,6 +51,8 @@
   (markril at hotmail dot com, Pierre)
 - Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
   (Paul Richards, Kalle)
+- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
+  (Sriram Natarajan)

 17 Jun 2009, PHP 5.2.10
 - Updated timezone database to version 2009.9 (2009i) (Derick)

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c	2009-07-21 20:11:28 UTC (rev 284556)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c	2009-07-21 20:32:32 UTC (rev 284557)
@@ -1160,6 +1160,9 @@

 	ch-uses = 0;

+	MAKE_STD_ZVAL(clone);
+	ch-clone = clone;
+
 	curl_easy_setopt(ch-cp, CURLOPT_NOPROGRESS,1);
 	curl_easy_setopt(ch-cp, CURLOPT_VERBOSE,   0);
 	curl_easy_setopt(ch-cp, CURLOPT_ERRORBUFFER,   ch-err.str);
@@ -1193,6 +1196,7 @@
 PHP_FUNCTION(curl_copy_handle)
 {
 	CURL		*cp;
+ 	zval		*clone;
 	zval		**zid;
 	php_curl	*ch, *dupch;

@@ -1255,6 +1259,10 @@
 	zend_llist_copy(dupch-to_free.slist, ch-to_free.slist);
 	zend_llist_copy(dupch-to_free.post, ch-to_free.post);

+	/* Keep track of cloned copies to avoid invoking curl destructors for every clone */
+	Z_ADDREF_P(ch-clone);
+	dupch-clone = ch-clone;
+
 	ZEND_REGISTER_RESOURCE(return_value, dupch, le_curl);
 	dupch-id = Z_LVAL_P(return_value);
 }
@@ -2073,9 +2081,20 @@
 #if LIBCURL_VERSION_NUM  0x071101
 	zend_llist_clean(ch-to_free.str);
 #endif
-	zend_llist_clean(ch-to_free.slist);
-	zend_llist_clean(ch-to_free.post);

+	/* cURL destructors should be invoked only by last curl handle */
+	if (Z_REFCOUNT_P(ch-clone) = 1) {
+		zend_llist_clean(ch-to_free.slist);
+		zend_llist_clean(ch-to_free.post);
+		zval_ptr_dtor(ch-clone);
+	} else {
+		Z_DELREF_P(ch-clone);
+		ch-to_free.slist.dtor = NULL;
+		ch-to_free.post.dtor = NULL;
+		zend_llist_clean(ch-to_free.slist);
+		zend_llist_clean(ch-to_free.post);
+	}
+
 	if (ch-handlers-write-buf.len  0) {
 		smart_str_free(ch-handlers-write-buf);
 	}

Modified: php/php-src/branches/PHP_5_2/ext/curl/php_curl.h
===
--- php/php-src/branches/PHP_5_2/ext/curl/php_curl.h	2009-07-21 20:11:28 UTC (rev 284556)
+++ php/php-src/branches/PHP_5_2/ext/curl/php_curl.h	2009-07-21 20:32:32 UTC (rev 284557)
@@ -132,6 +132,7 @@
 	long id;
 	unsigned int uses;
 	zend_boolin_callback;
+	zval *clone;
 } php_curl;

 typedef struct {

Added: php/php-src/branches/PHP_5_2/ext/curl/tests/curl_copy_handle_basic_007.phpt
===
--- php/php-src/branches/PHP_5_2/ext/curl/tests/curl_copy_handle_basic_007.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/curl/tests/curl_copy_handle_basic_007.phpt	2009-07-21 20:32:32 UTC (rev 284557)
@@ -0,0 +1,44 @@
+--TEST--
+Test curl_copy_handle() with simple POST
+--SKIPIF--
+?php if (!extension_loaded(curl) || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print skip; ?
+--FILE--
+?php
+  $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
+
+  echo '*** Testing curl copy handle with simple POST using array as arguments ***' . \n;
+
+  $url = {$host}/get.php?test=getpost;
+  $ch = curl_init();
+
+  ob_start(); // start output buffering
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+  curl_setopt($ch, CURLOPT_POST, 1);
+  curl_setopt($ch, CURLOPT_POSTFIELDS, array(Hello = World, Foo = Bar, Person = John Doe));
+  curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
+
+  $copy = curl_copy_handle($ch);
+  curl_close($ch);
+
+  $curl_content = curl_exec($copy