[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/sapi/cli/php.1.in branches/PHP_5_3/sapi/cli/php.1.in trunk/sapi/cli/php.1.in
iliaaMon, 04 Jan 2010 12:38:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293075 Log: Update copyright year in the man file Changed paths: U php/php-src/branches/PHP_5_2/sapi/cli/php.1.in U php/php-src/branches/PHP_5_3/sapi/cli/php.1.in U php/php-src/trunk/sapi/cli/php.1.in Modified: php/php-src/branches/PHP_5_2/sapi/cli/php.1.in === --- php/php-src/branches/PHP_5_2/sapi/cli/php.1.in 2010-01-04 12:20:52 UTC (rev 293074) +++ php/php-src/branches/PHP_5_2/sapi/cli/php.1.in 2010-01-04 12:38:07 UTC (rev 293075) @@ -1,4 +1,4 @@ -.TH PHP 1 2009 The PHP Group Scripting Language +.TH PHP 1 2010 The PHP Group Scripting Language .SH NAME .TP 15 php \- PHP Command Line Interface 'CLI' @@ -398,7 +398,7 @@ .SH VERSION INFORMATION This manpage describes \fBphp\fP, version @php_vers...@. .SH COPYRIGHT -Copyright \(co 1997\-2009 The PHP Group +Copyright \(co 1997\-2010 The PHP Group .LP This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is Modified: php/php-src/branches/PHP_5_3/sapi/cli/php.1.in === --- php/php-src/branches/PHP_5_3/sapi/cli/php.1.in 2010-01-04 12:20:52 UTC (rev 293074) +++ php/php-src/branches/PHP_5_3/sapi/cli/php.1.in 2010-01-04 12:38:07 UTC (rev 293075) @@ -1,4 +1,4 @@ -.TH PHP 1 2009 The PHP Group Scripting Language +.TH PHP 1 2010 The PHP Group Scripting Language .SH NAME .TP 15 php \- PHP Command Line Interface 'CLI' @@ -398,7 +398,7 @@ .SH VERSION INFORMATION This manpage describes \fBphp\fP, version @php_vers...@. .SH COPYRIGHT -Copyright \(co 1997\-2009 The PHP Group +Copyright \(co 1997\-2010 The PHP Group .LP This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is Modified: php/php-src/trunk/sapi/cli/php.1.in === --- php/php-src/trunk/sapi/cli/php.1.in 2010-01-04 12:20:52 UTC (rev 293074) +++ php/php-src/trunk/sapi/cli/php.1.in 2010-01-04 12:38:07 UTC (rev 293075) @@ -1,4 +1,4 @@ -.TH PHP 1 2009 The PHP Group Scripting Language +.TH PHP 1 2010 The PHP Group Scripting Language .SH NAME .TP 15 php \- PHP Command Line Interface 'CLI' @@ -398,7 +398,7 @@ .SH VERSION INFORMATION This manpage describes \fBphp\fP, version @php_vers...@. .SH COPYRIGHT -Copyright \(co 1997\-2009 The PHP Group +Copyright \(co 1997\-2010 The PHP Group .LP This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is -- 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/mysqli/tests/mysqli_get_cache_stats.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt branches/PHP_5_3/ext/mysqli/tests
uw Mon, 04 Jan 2010 13:44:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293076 Log: The internal zval cache has been removed and not been reintroduced... remove corresponding test code Changed paths: D php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats.phpt D php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_phpinfo.phpt D php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats.phpt D php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_phpinfo.phpt Deleted: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats.phpt 2010-01-04 12:38:07 UTC (rev 293075) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats.phpt 2010-01-04 13:44:10 UTC (rev 293076) @@ -1,116 +0,0 @@ ---TEST-- -mysqli_get_cache_stats() ---XFAIL-- -zval caching has been temporarily disabled for the 5.3.0 release ---INI-- -mysqlnd.collect_statistics=1 -mysqlnd.collect_memory_statistics=1 ---SKIPIF-- -?PHP -require_once('skipif.inc'); -require_once('skipifemb.inc'); -require_once('skipifconnectfailure.inc'); -if (!function_exists('mysqli_get_cache_stats')) { - die(skip only available with mysqlnd); -} -? ---FILE-- -?php - $tmp = $link = null; - if (!is_null($tmp = @mysqli_get_cache_stats($link))) - printf([001] Expecting NULL, got %s/%s\n, gettype($tmp), $tmp); - - require_once(connect.inc); - - if (!is_array($info = mysqli_get_cache_stats()) || empty($info)) - printf([002] Expecting array/any_non_empty, got %s/%s\n, gettype($info), $info); - - var_dump($info); - - if ($info[size] !== $info['free_items']) - printf([003] Unused cache should have size (%d) == free_items (%d)\n, - $info[size], $info['free_items']); - - require_once('table.inc'); - - if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info)) - printf([004] Expecting array/any_non_empty, got %s/%s\n, gettype($new_info), $new_info); - - if ($info['size'] !== $new_info['size']) - printf([005] Cache size should not have changes! Expecting int/%d, got %s/%d\n, - $info['size'], gettype($new_info['size']), $new_info['size']); - - if (count($info) != count($new_info)) { - printf([006] Both arrays should have the same number of entries\n); - var_dump($info); - var_dump($new_info); - } - - if (!$res = mysqli_real_query($link, SELECT id, label FROM test ORDER BY id)) - printf([007] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); - - if (!is_object($res = mysqli_use_result($link))) - printf([008] Expecting object, got %s/%s. [%d] %s\n, - gettype($res), $res, mysqli_errno($link), mysqli_error($link)); - - if (!$row = mysqli_fetch_assoc($res)) - printf([009] There should be at least one row in the test table for this test, [%d] %s\n, - mysqli_errno($link), mysqli_error($link)); - - if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info)) - printf([010] Expecting array/any_non_empty, got %s/%s\n, gettype($new_info), $new_info); - - if ($new_info['get_hits'] = $info['get_hits']) - printf([011] get_hits should have increased, %d (new) = %d (old)!\n, - $new_info['get_hits'], $info['get_hits']); - - if (!$row = mysqli_fetch_assoc($res)) - printf([012] There should be two rows in the test table for this test, [%d] %s\n, - mysqli_errno($link), mysqli_error($link)); - - if (!is_array($new_info = mysqli_get_cache_stats()) || empty($new_info)) - printf([013] Expecting array/any_non_empty, got %s/%s\n, gettype($new_info), $new_info); - - if ($new_info['put_misses'] = $info['put_misses']) - printf([014] put_misses should have increased, %d (new) = %d (old)!\n, - $new_info['put_misses'], $info['put_misses']); - - if ($new_info['references'] $info['references'] + 2) - printf([015] reference counter should have increased, %d (new) %d + 2 (old)!\n, - $new_info['references'], $info['references']); - - unset($row); - mysqli_free_result($res); - - if (!is_array($info = mysqli_get_cache_stats()) || empty($info)) - printf([016] Expecting array/any_non_empty, got %s/%s\n, gettype($info), $info); - - if ($info['free_items'] = $new_info['free_items']) - printf([017] Looks like cached entries never get free'd.\n); - - mysqli_close($link); - - print done!; -? ---CLEAN-- -?php - require_once(clean_table.inc); -? ---EXPECTF-- -array(7) { - [%u|b%put_hits]= - int(0) - [%u|b%put_misses]= - int(0) - [%u|b%get_hits]= - int(0) - [%u|b%get_misses]= - int(0) - [%u|b%size]= - int(%d) - [%u|b%free_items]= - int(%d) - [%u|b%references]= - int(%d) -} -done! \ No newline at end of file Deleted: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt trunk/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt
uw Mon, 04 Jan 2010 14:34:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293080 Log: Tweaking test. Andrey, you once requested such a test, please have a look if it does exactly what you want it to do. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt 2010-01-04 14:29:52 UTC (rev 293079) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt 2010-01-04 14:34:44 UTC (rev 293080) @@ -4,6 +4,18 @@ ?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf(SKIP [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error())); + +$max_len = pow(2, 24); +if (!$res = mysqli_query($link, SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet')) + die(sprintf(SKIP [%d] %s\n, mysqli_errno($link), mysqli_error($link))); + +if (!mysqli_query($link, SET NAMES 'latin1')) + die(sprintf(SKIP [%d] %s\n, mysqli_errno($link), mysqli_error($link))); + +mysqli_close($link); ? --INI-- memory_limit=256M @@ -33,45 +45,48 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf([006] [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + if (!mysqli_query($link, SET NAMES 'latin1')) + printf([007] [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + if (!$res = mysqli_query($link, SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet')) - printf([007] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([008] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); if (!$row = mysqli_fetch_assoc($res)) - printf([008] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([009] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); mysqli_free_result($res); if (0 === ($max_allowed_packet = (int)$row['Value'])) - printf([009] Cannot determine max_allowed_packet size and/or bogus max_allowed_packet setting used.\n); + printf([010] Cannot determine max_allowed_packet size and/or bogus max_allowed_packet setting used.\n); $max_len = pow(2, 24); if ($max_allowed_packet $max_len) { - printf([010] Failed to change max_allowed_packet); + printf([011] Failed to change max_allowed_packet); } if (!mysqli_query($link, CREATE TABLE test(col_blob LONGBLOB) ENGINE= . $engine)) - printf([011] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([012] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); $query_prefix = 'INSERT INTO test(col_blob) VALUES ('; $query_postfix = ')'; $query_len = strlen($query_prefix) + strlen($query_postfix); - $com_query_len = 1; + $com_query_len = 2; $blob = str_repeat('a', $max_len - $com_query_len - $query_len); $query = sprintf(%s%s%s, $query_prefix, $blob, $query_postfix); if (!mysqli_query($link, $query)) - printf([012] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([013] max_allowed_packet = %d, strlen(query) = %d, [%d] %s\n, $max_allowed_packet, strlen($query), mysqli_errno($link), mysqli_error($link)); if (!$res = mysqli_query($link, SELECT col_blob FROM test)) - printf([013] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([014] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); if (!$row = mysqli_fetch_assoc($res)) { - printf([014] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([015] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); } else { if ($row['col_blob'] != $blob) { - printf([015] Blob seems wrong, dumping data\n); + printf([016] Blob seems wrong, dumping data\n); var_dump(strlen($row['col_blob'])); var_dump(strlen($blob)); } @@ -79,7 +94,7 @@ } if (!mysqli_query($link, SET GLOBAL max_allowed_packet = . $org_max_allowed_packet)) - printf([016] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); + printf([017] [%d] %s\n, mysqli_errno($link), mysqli_error($link)); mysqli_close($link); Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt trunk/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt
uw Mon, 04 Jan 2010 14:59:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293084 Log: Fixing test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt 2010-01-04 14:57:08 UTC (rev 293083) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt 2010-01-04 14:59:04 UTC (rev 293084) @@ -30,9 +30,14 @@ if (!$res = $mysqli-query(SELECT 'mysqli.default_socket' AS testing)) printf([001] [%d] %s\n, $mysqli-errno, $mysqli-error); - var_dump($res-fetch_assoc()); + $tmp = $res-fetch_assoc(); $res-free_result(); + if (!isset($tmp['testing']) || $tmp['testing'] != $socket) { + printf([002] mysqli.default_socket not properly set?\n); + var_dump($tmp); + } + $mysqli-close(); } catch (mysqli_sql_exception $e) { @@ -151,10 +156,6 @@ --EXPECTF-- array(1) { [%u|b%testing]= - %unicode|string%(21) mysqli.default_socket -} -array(1) { - [%u|b%testing]= %unicode|string%(19) mysqli.default_port } array(1) { Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt 2010-01-04 14:57:08 UTC (rev 293083) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt 2010-01-04 14:59:04 UTC (rev 293084) @@ -30,9 +30,14 @@ if (!$res = $mysqli-query(SELECT 'mysqli.default_socket' AS testing)) printf([001] [%d] %s\n, $mysqli-errno, $mysqli-error); - var_dump($res-fetch_assoc()); + $tmp = $res-fetch_assoc(); $res-free_result(); + if (!isset($tmp['testing']) || $tmp['testing'] != $socket) { + printf([002] mysqli.default_socket not properly set?\n); + var_dump($tmp); + } + $mysqli-close(); } catch (mysqli_sql_exception $e) { @@ -151,10 +156,6 @@ --EXPECTF-- array(1) { [%u|b%testing]= - %unicode|string%(21) mysqli.default_socket -} -array(1) { - [%u|b%testing]= %unicode|string%(19) mysqli.default_port } array(1) { -- 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/mysql/tests/mysql_phpinfo.phpt trunk/ext/mysql/tests/mysql_phpinfo.phpt
uw Mon, 04 Jan 2010 15:05:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293085 Log: The internal zval cache has been removed and not been reintroduced... remove corresponding test code Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_phpinfo.phpt U php/php-src/trunk/ext/mysql/tests/mysql_phpinfo.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_phpinfo.phpt === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_phpinfo.phpt 2010-01-04 14:59:04 UTC (rev 293084) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_phpinfo.phpt 2010-01-04 15:05:34 UTC (rev 293085) @@ -1,8 +1,8 @@ --TEST-- phpinfo() mysql section --SKIPIF-- -?php -require_once('skipif.inc'); +?php +require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ? --FILE-- @@ -62,8 +62,7 @@ 'connect_failure', 'connection_reused', 'explicit_close', 'implicit_close', 'disconnect_close', 'in_middle_of_command_close', 'explicit_free_result', 'implicit_free_result', 'explicit_stmt_close', 'implicit_stmt_close', - 'put_hits', 'put_misses', 'get_hits', 'get_misses', - 'size', 'free_items', 'references', 'mysql.cache_size', + 'size', ); foreach ($expected as $k = $entry) if (!stristr($phpinfo, $entry)) Modified: php/php-src/trunk/ext/mysql/tests/mysql_phpinfo.phpt === --- php/php-src/trunk/ext/mysql/tests/mysql_phpinfo.phpt2010-01-04 14:59:04 UTC (rev 293084) +++ php/php-src/trunk/ext/mysql/tests/mysql_phpinfo.phpt2010-01-04 15:05:34 UTC (rev 293085) @@ -1,8 +1,8 @@ --TEST-- phpinfo() mysql section --SKIPIF-- -?php -require_once('skipif.inc'); +?php +require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ? --FILE-- @@ -62,8 +62,7 @@ 'connect_failure', 'connection_reused', 'explicit_close', 'implicit_close', 'disconnect_close', 'in_middle_of_command_close', 'explicit_free_result', 'implicit_free_result', 'explicit_stmt_close', 'implicit_stmt_close', - 'put_hits', 'put_misses', 'get_hits', 'get_misses', - 'size', 'free_items', 'references', 'mysql.cache_size', + 'size', ); foreach ($expected as $k = $entry) if (!stristr($phpinfo, $entry)) -- 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/mysqli/tests/mysqli_constants.phpt trunk/ext/mysqli/tests/mysqli_constants.phpt
uw Mon, 04 Jan 2010 15:29:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293086 Log: Updating test to new libmysql feature set (first introduced in MySQL 6.0 but now backported to MySQL 5.5). Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt 2010-01-04 15:05:34 UTC (rev 293085) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt 2010-01-04 15:29:18 UTC (rev 293086) @@ -117,7 +117,9 @@ if (($version 51122 $version 6) || ($version 60003) || $IS_MYSQLND) { $expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true; } - if ($version 60005 || $IS_MYSQLND) { + + /* First introduced in MySQL 6.0, backported to MySQL 5.5 */ + if ($version = 50500 || $IS_MYSQLND) { $expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true; } Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt2010-01-04 15:05:34 UTC (rev 293085) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt2010-01-04 15:29:18 UTC (rev 293086) @@ -117,7 +117,9 @@ if (($version 51122 $version 6) || ($version 60003) || $IS_MYSQLND) { $expected_constants['MYSQLI_ON_UPDATE_NOW_FLAG'] = true; } - if ($version 60005 || $IS_MYSQLND) { + + /* First introduced in MySQL 6.0, backported to MySQL 5.5 */ + if ($version = 50500 || $IS_MYSQLND) { $expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/imap/ php_imap.c
pajoye Tue, 05 Jan 2010 00:50:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293123 Log: - [DOC] MF53: add INTERNALDATE to imap_append Changed paths: U php/php-src/trunk/ext/imap/php_imap.c Modified: php/php-src/trunk/ext/imap/php_imap.c === --- php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 00:36:40 UTC (rev 293122) +++ php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 00:50:19 UTC (rev 293123) @@ -41,6 +41,7 @@ #include ext/standard/info.h #include ext/standard/file.h #include ext/standard/php_smart_str.h +#include ext/pcre/php_pcre.h #ifdef ERROR #undef ERROR @@ -118,6 +119,7 @@ ZEND_ARG_INFO(0, folder) ZEND_ARG_INFO(0, message) ZEND_ARG_INFO(0, options) + ZEND_ARG_INFO(0, date) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_num_msg, 0, 0, 1) @@ -1266,20 +1268,45 @@ PHP_FUNCTION(imap_append) { zval *streamind; - char *folder, *message, *flags = NULL; - int folder_len, message_len, flags_len = 0; + char *folder, *message, *internal_date = NULL, *flags = NULL; + int folder_len, message_len, internal_date_len = 0, flags_len = 0; pils *imap_le_struct; STRING st; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|s, streamind, folder, folder_len, message, message_len, flags, flags_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|ss, streamind, folder, folder_len, message, message_len, flags, flags_len, internal_date, internal_date_len) == FAILURE) { return; } + zend_uchar unicode_date = (zend_uchar) internal_date; + char* regex = /[ 0-3][0-9]-((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))-[0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [+-][0-9]{4}/; + int regex_len = strlen(regex); + pcre_cache_entry *pce; /* Compiled regex */ + zval *subpats = NULL; /* Parts (not used) */ + long regex_flags = 0; /* Flags (not used) */ + long start_offset = 0; /* Start offset (not used) */ + int global = 0; + + if (internal_date) { + /* Make sure the given internal_date string matches the RFC specified format */ + if ((pce = pcre_get_compiled_regex_cache(unicode_date, regex, regex_len TSRMLS_CC)) == NULL) { + RETURN_FALSE; + } + + php_pcre_match_impl(pce, unicode_date, internal_date, internal_date_len, return_value, subpats, global, + 0, regex_flags, start_offset TSRMLS_CC); + + if (!Z_LVAL_P(return_value)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, internal date not correctly formatted); + internal_date = NULL; + } + } + + ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); INIT (st, mail_string, (void *) message, message_len); - if (mail_append_full(imap_le_struct-imap_stream, folder, (flags ? flags : NIL), NIL, st)) { + if (mail_append_full(imap_le_struct-imap_stream, folder, (flags ? flags : NIL), (internal_date ? internal_date : NIL), st)) { RETURN_TRUE; } else { RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/imap/ php_imap.c
pajoye Tue, 05 Jan 2010 01:02:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293124 Log: - [doc] fix exchange and other imap server support when a preferred auth method is not desired. Add option support to imap_open. Only 'DISABLE_AUTHENTICATOR' is supported yet, see #33500 for an example Bug: http://bugs.php.net/33500 (Assigned) imap_open() fails when the server advertises GSSAPI Changed paths: U php/php-src/trunk/ext/imap/php_imap.c Modified: php/php-src/trunk/ext/imap/php_imap.c === --- php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 00:50:19 UTC (rev 293123) +++ php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 01:02:15 UTC (rev 293124) @@ -105,6 +105,7 @@ ZEND_ARG_INFO(0, password) ZEND_ARG_INFO(0, options) ZEND_ARG_INFO(0, n_retries) + ZEND_ARG_INFO(0, params) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_reopen, 0, 0, 2) @@ -1148,10 +1149,11 @@ long retries = 0, flags = NIL, cl_flags = NIL; MAILSTREAM *imap_stream; pils *imap_le_struct; + zval *params = NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, sss|ll, mailbox, mailbox_len, user, user_len, - passwd, passwd_len, flags, retries) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, sss|lla, mailbox, mailbox_len, user, user_len, + passwd, passwd_len, flags, retries, params) == FAILURE) { return; } @@ -1165,6 +1167,46 @@ } } + if (params) { + zval **disabled_auth_method; + DebugBreak(); + if (zend_hash_find(HASH_OF(params), DISABLE_AUTHENTICATOR, sizeof(DISABLE_AUTHENTICATOR), (void **)disabled_auth_method) == SUCCESS) { + switch (Z_TYPE_PP(disabled_auth_method)) { + case IS_STRING: + if (Z_STRLEN_PP(disabled_auth_method) 1) { + mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(disabled_auth_method)); + } + break; + case IS_ARRAY: + { + zval **z_auth_method; + int i; + int nelems = zend_hash_num_elements(Z_ARRVAL_PP(disabled_auth_method)); + + if (nelems == 0 ) { + break; + } + for (i = 0; i nelems; i++) { + if (zend_hash_index_find(Z_ARRVAL_PP(disabled_auth_method), i, (void **) z_auth_method) == SUCCESS) { + if (Z_TYPE_PP(z_auth_method) == IS_STRING) { + if (Z_STRLEN_PP(z_auth_method) 1) { + mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(disabled_auth_method)); + } + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid argument, expect string or array of strings); + } + } + } + } + break; + case IS_LONG: + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid argument, expect string or array of strings); + break; + } + } + } + if (IMAPG(imap_user)) { efree(IMAPG(imap_user)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/imap/ php_imap.c
pajoye Tue, 05 Jan 2010 01:05:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293125 Log: - should not have commited Changed paths: U php/php-src/trunk/ext/imap/php_imap.c Modified: php/php-src/trunk/ext/imap/php_imap.c === --- php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 01:02:15 UTC (rev 293124) +++ php/php-src/trunk/ext/imap/php_imap.c 2010-01-05 01:05:58 UTC (rev 293125) @@ -1169,7 +1169,6 @@ if (params) { zval **disabled_auth_method; - DebugBreak(); if (zend_hash_find(HASH_OF(params), DISABLE_AUTHENTICATOR, sizeof(DISABLE_AUTHENTICATOR), (void **)disabled_auth_method) == SUCCESS) { switch (Z_TYPE_PP(disabled_auth_method)) { case IS_STRING: -- 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 ext/imap/php_imap.c
pajoye Tue, 05 Jan 2010 01:12:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=293126 Log: - [doc] add support for DISABLE_AUTHENTICATOR in imap_open (fix #33500) Bug: http://bugs.php.net/33500 (Assigned) imap_open() fails when the server advertises GSSAPI Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-01-05 01:05:58 UTC (rev 293125) +++ php/php-src/branches/PHP_5_3/NEWS 2010-01-05 01:12:18 UTC (rev 293126) @@ -3,6 +3,7 @@ ?? ??? 20??, PHP 5.3.3 - Upgraded bundled libmagic to version 5.03. (Mikko) +- Added support for DISABLE_AUTHENTICATOR for imap_open. (Pierre) - Added missing host validation for HTTP urls inside FILTER_VALIDATE_URL. (Ilia) - Added stream_resolve_include_path(). (Mikko) Modified: php/php-src/branches/PHP_5_3/ext/imap/php_imap.c === --- php/php-src/branches/PHP_5_3/ext/imap/php_imap.c2010-01-05 01:05:58 UTC (rev 293125) +++ php/php-src/branches/PHP_5_3/ext/imap/php_imap.c2010-01-05 01:12:18 UTC (rev 293126) @@ -105,6 +105,7 @@ ZEND_ARG_INFO(0, password) ZEND_ARG_INFO(0, options) ZEND_ARG_INFO(0, n_retries) + ZEND_ARG_INFO(0, params) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_reopen, 0, 0, 2) @@ -1148,10 +1149,11 @@ long retries = 0, flags = NIL, cl_flags = NIL; MAILSTREAM *imap_stream; pils *imap_le_struct; + zval *params = NULL; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, sss|ll, mailbox, mailbox_len, user, user_len, - passwd, passwd_len, flags, retries) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, sss|lla, mailbox, mailbox_len, user, user_len, + passwd, passwd_len, flags, retries, params) == FAILURE) { return; } @@ -1165,6 +1167,46 @@ } } + if (params) { + zval **disabled_auth_method; + + if (zend_hash_find(HASH_OF(params), DISABLE_AUTHENTICATOR, sizeof(DISABLE_AUTHENTICATOR), (void **)disabled_auth_method) == SUCCESS) { + switch (Z_TYPE_PP(disabled_auth_method)) { + case IS_STRING: + if (Z_STRLEN_PP(disabled_auth_method) 1) { + mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(disabled_auth_method)); + } + break; + case IS_ARRAY: + { + zval **z_auth_method; + int i; + int nelems = zend_hash_num_elements(Z_ARRVAL_PP(disabled_auth_method)); + + if (nelems == 0 ) { + break; + } + for (i = 0; i nelems; i++) { + if (zend_hash_index_find(Z_ARRVAL_PP(disabled_auth_method), i, (void **) z_auth_method) == SUCCESS) { + if (Z_TYPE_PP(z_auth_method) == IS_STRING) { + if (Z_STRLEN_PP(z_auth_method) 1) { + mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(disabled_auth_method)); + } + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid argument, expect string or array of strings); + } + } + } + } + break; + case IS_LONG: + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid argument, expect string or array of strings); + break; + } + } + } + if (IMAPG(imap_user)) { efree(IMAPG(imap_user)); } -- PHP CVS Mailing List
[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
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); + } +