[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Oct 7 01:40:24 2005 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.783r2=1.784ty=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.783 ZendEngine2/ChangeLog:1.784 --- ZendEngine2/ChangeLog:1.783 Thu Oct 6 01:34:43 2005 +++ ZendEngine2/ChangeLog Fri Oct 7 01:40:21 2005 @@ -1,3 +1,33 @@ +2005-10-06 Marcus Boerger [EMAIL PROTECTED] + +* (PHP_5_1) + zend_reflection_api.c: + - MFH ReflectionClass::isInstantiable and abstract classes + +* zend_object_handlers.c: + - BC: php objects convert to int/double 1 with notice + +* tests/bug32322.phpt: + - Show the test finishes/dos2unix + +* tests/bug28444.phpt + tests/bug30791.phpt + tests/bug32290.phpt + tests/bug32290.phpt: + - Fix test + +* tests/bug26166.phpt: + - Fix test + - Convert to unicode + +* zend_object_handlers.c: + - Any php object converts to boolean as true + +2005-10-06 Dmitry Stogov [EMAIL PROTECTED] + +* zend_API.c: + Cleanup + 2005-10-05 Marcus Boerger [EMAIL PROTECTED] * zend.c @@ -10588,7 +10618,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.783 2005/10/06 05:34:43 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.784 2005/10/07 05:40:21 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -12312,7 +12342,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.783 2005/10/06 05:34:43 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.784 2005/10/07 05:40:21 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
dmitry Thu Oct 6 02:27:28 2005 EDT Modified files: /php-src/ext/simplexml simplexml.c Log: Fixed compilation error http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.162r2=1.163ty=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.162 php-src/ext/simplexml/simplexml.c:1.163 --- php-src/ext/simplexml/simplexml.c:1.162 Wed Oct 5 15:12:42 2005 +++ php-src/ext/simplexml/simplexml.c Thu Oct 6 02:27:27 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.162 2005/10/05 19:12:42 helly Exp $ */ +/* $Id: simplexml.c,v 1.163 2005/10/06 06:27:27 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1083,7 +1083,7 @@ MAKE_STD_ZVAL(retval); - if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) { + if (sxe_object_cast(z, retval, IS_STRING TSRMLS_CC)==FAILURE) { zend_error(E_ERROR, Unable to cast node to string); /* FIXME: Should not be fatal */ } @@ -1757,7 +1757,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.162 $); + php_info_print_table_row(2, Revision, $Revision: 1.163 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] Re: cvs: php-src /ext/date/lib timelib_structs.h
On Wed, 5 Oct 2005, Greg Beaver wrote: Jani Taskinen wrote: sniper Mon Oct 3 16:20:50 2005 EDT Modified files: /php-src/ext/date/lib timelib_structs.h Log: Generated files are included like this.. [snip] -#include timelib_config.h +#include timelib_config.h I do believe that: #ifdef PHP_WIN32 #include timelib_config.h #else #include timelib_config.h #endif should fix the windows build without ruining the patch. No, can't do that as PHP_WIN32 is not defined for the standalone library. regrads, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/wddx php_wddx_api.h wddx.c
In-Reply-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] References: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Wed, 5 Oct 2005, Rob Richards wrote: rrichards Wed Oct 5 18:36:11 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/wddx php_wddx_api.h wddx.c Log: MFH: fix buffer lengths passed to snprintf http://cvs.php.net/diff.php/php-src/ext/wddx/php_wddx_api.h?r1=1.23r2=1.23.2.1ty=u Index: php-src/ext/wddx/php_wddx_api.h diff -u php-src/ext/wddx/php_wddx_api.h:1.23 php-src/ext/wddx/php_wddx_api.h:1.23.2.1 --- php-src/ext/wddx/php_wddx_api.h:1.23 Wed Aug 3 10:08:20 2005 +++ php-src/ext/wddx/php_wddx_api.h Wed Oct 5 18:36:10 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_wddx_api.h,v 1.23 2005/08/03 14:08:20 sniper Exp $ */ +/* $Id: php_wddx_api.h,v 1.23.2.1 2005/10/05 22:36:10 rrichards Exp $ */ #ifndef PHP_WDDX_API_H #define PHP_WDDX_API_H @@ -47,6 +47,9 @@ #define WDDX_VAR_Svar name='%s' #define WDDX_VAR_E/var +#define WDDX_NUMBER_LEN 17 +#define WDDX_VAR_S_LEN 13 + #define php_wddx_add_chunk(packet, str) smart_str_appends(packet, str) #define php_wddx_add_chunk_ex(packet, str, len) smart_str_appendl(packet, str, len) #define php_wddx_add_chunk_static(packet, str) smart_str_appendl(packet, str, sizeof(str)-1) http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=1.119.2.3r2=1.119.2.4ty=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.3 php-src/ext/wddx/wddx.c:1.119.2.4 --- php-src/ext/wddx/wddx.c:1.119.2.3 Fri Sep 16 13:11:02 2005 +++ php-src/ext/wddx/wddx.c Wed Oct 5 18:36:10 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.119.2.3 2005/09/16 17:11:02 tony2001 Exp $ */ +/* $Id: wddx.c,v 1.119.2.4 2005/10/05 22:36:10 rrichards Exp $ */ #include php.h @@ -422,7 +422,7 @@ tmp = *var; zval_copy_ctor(tmp); convert_to_string(tmp); - snprintf(tmp_buf, Z_STRLEN(tmp), WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, Z_STRLEN(tmp) + WDDX_NUMBER_LEN + 1, WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(tmp); Why not like this: snprintf(tmp_buf, Z_STRLEN(tmp) + sizeof(WDDX_NUMBER) + 1, WDDX_NUMBER, Z_STRVAL(tmp)); Adding extra define just for this seems a bit overkill. (and it is error prone too :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Thu Oct 6 05:29:34 2005 EDT Modified files: /php-srcrun-tests.php Log: - Fix redir tests, test count, faillog # Everything should work again now http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.234r2=1.235ty=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.234 php-src/run-tests.php:1.235 --- php-src/run-tests.php:1.234 Wed Oct 5 20:38:55 2005 +++ php-src/run-tests.php Thu Oct 6 05:29:32 2005 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.234 2005/10/06 00:38:55 helly Exp $ */ +/* $Id: run-tests.php,v 1.235 2005/10/06 09:29:32 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -330,17 +330,12 @@ echo Running selected tests.\n; $start_time = time(); $test_idx = 0; - foreach($test_files AS $name) { - $test_results[is_array($name) ? $name[0] : $name] = run_test($php,$name,$test_cnt,++$test_idx); - if ($failed_tests_file ($test_results[$name] == 'FAILED' || $test_results[$name] == 'WARNED')) { - fwrite($failed_tests_file, $name\n); - } - } + run_all_tests($test_files); + $end_time = time(); if ($failed_tests_file) { fclose($failed_tests_file); } - $end_time = time(); - if (count($test_files)) { + if (count($test_files) || count($test_results)) { echo =; compute_summary(); @@ -452,11 +447,11 @@ $test_cnt = count($test_files); $test_idx = 0; -foreach ($test_files as $name) { - $test_results[$name] = run_test($php,$name,$test_cnt,++$test_idx); -} - +run_all_tests($test_files); $end_time = time(); +if ($failed_tests_file) { + fclose($failed_tests_file); +} // Summarize results @@ -703,13 +698,34 @@ return $data; } +function run_all_tests($test_files, $redir_tested = NULL) +{ + global $test_results, $failed_tests_file, $php, $test_cnt, $test_idx; + + foreach($test_files AS $name) { + $index = is_array($name) ? $name[0] : $name; + $test_idx++; + $result = run_test($php,$name); + if (!is_array($name) $result != 'REDIR') { + $test_results[$index] = $result; + if ($failed_tests_file ($result == 'FAILED' || $result == 'WARNED')) { + if ($redir_tested) { + fwrite($failed_tests_file, # $redir_tested: $name\n); + } else { + fwrite($failed_tests_file, $name\n); + } + } + } + } +} + // // Run an individual test case. // -function run_test($php, $file, $test_cnt, $test_idx) +function run_test($php, $file) { - global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS, $pass_options, $DETAILED, $IN_REDIRECT; + global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS, $pass_options, $DETAILED, $IN_REDIRECT, $test_cnt, $test_idx; $org_file = $file; @@ -894,8 +910,6 @@ } if (@count($section_text['REDIRECTTEST']) == 1) { - global $test_files, $test_results, $failed_tests_file; - $saved_test_files = $test_files; $test_files = array(); $IN_REDIRECT = eval($section_text['REDIRECTTEST']); @@ -906,10 +920,12 @@ if (is_array($org_file)) { $test_files[] = $org_file[1]; } else { + $GLOBALS['test_files'] = $test_files; find_files($IN_REDIRECT['TESTS']); + $test_files = $GLOBALS['test_files']; } - $test_cnt += count($test_files); - $GLOBALS['test_cnt'] = $test_cnt; + $test_cnt += count($test_files) - 1; + $test_idx--; echo --- $IN_REDIRECT[TESTS] ($tested)\n; @@ -920,20 +936,10 @@ putenv(REDIR_TEST_DIR= . realpath($IN_REDIRECT['TESTS']) . DIRECTORY_SEPARATOR); usort($test_files, test_sort); - foreach ($test_files as $name) { - $result = run_test($php, $name, $test_cnt, ++$test_idx); - $test_results[$tested . ': ' . $name] = $result; - if ($failed_tests_file ($result == 'FAILED' || $result ==
[PHP-CVS] cvs: php-src / run-tests.php
helly Thu Oct 6 05:39:32 2005 EDT Modified files: /php-srcrun-tests.php Log: - WS http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.235r2=1.236ty=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.235 php-src/run-tests.php:1.236 --- php-src/run-tests.php:1.235 Thu Oct 6 05:29:32 2005 +++ php-src/run-tests.php Thu Oct 6 05:39:32 2005 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.235 2005/10/06 09:29:32 helly Exp $ */ +/* $Id: run-tests.php,v 1.236 2005/10/06 09:39:32 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -163,53 +163,53 @@ { global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options; -// Get info from php -$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; [EMAIL PROTECTED]($info_file); -$php_info = '?php echo + // Get info from php + $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; + @unlink($info_file); + $php_info = '?php echo PHP_SAPI: . PHP_SAPI . PHP_VERSION : . phpversion() . ZEND_VERSION: . zend_version() . PHP_OS : . PHP_OS . - . php_uname() . INI actual : . realpath(get_cfg_var(cfg_file_path)) . More .INIs : . (function_exists(\'php_ini_scanned_files\') ? str_replace(\n,, php_ini_scanned_files()) : ** not determined **); ?'; -save_text($info_file, $php_info); -$info_params = array(); -settings2array($ini_overwrites,$info_params); -settings2params($info_params); -$php_info = `$php $pass_options $info_params $info_file`; [EMAIL PROTECTED]($info_file); -define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`); - -$unicode = `$php $pass_options $info_params -r 'echo ini_get(unicode_semantics);'`; -define('TESTED_UNICODE', strcasecmp($unicode,on) == 0 || $unicode == 1); - -// check for extensions that need special handling and regenerate -$php_extensions = '?php echo join(,,get_loaded_extensions()); ?'; -save_text($info_file, $php_extensions); -$php_extensions = explode(',',`$php $pass_options $info_params $info_file`); -$info_params_ex = array( + save_text($info_file, $php_info); + $info_params = array(); + settings2array($ini_overwrites,$info_params); + settings2params($info_params); + $php_info = `$php $pass_options $info_params $info_file`; + @unlink($info_file); + define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`); + + $unicode = `$php $pass_options $info_params -r 'echo ini_get(unicode_semantics);'`; + define('TESTED_UNICODE', strcasecmp($unicode,on) == 0 || $unicode == 1); + + // check for extensions that need special handling and regenerate + $php_extensions = '?php echo join(,,get_loaded_extensions()); ?'; + save_text($info_file, $php_extensions); + $php_extensions = explode(',',`$php $pass_options $info_params $info_file`); + $info_params_ex = array( 'session' = array('session.auto_start=0'), 'zlib' = array('zlib.output_compression=Off'), 'xdebug' = array('xdebug.default_enable=0'), ); -foreach($info_params_ex as $ext = $ini_overwrites_ex) { - if (in_array($ext, $php_extensions)) { - $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); + foreach($info_params_ex as $ext = $ini_overwrites_ex) { + if (in_array($ext, $php_extensions)) { + $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); + } } -} [EMAIL PROTECTED]($info_file); + @unlink($info_file); -// Write test context information. -echo + // Write test context information. + echo = CWD : $cwd PHP : $php $php_info Extra dirs : ; -foreach ($user_tests as $test_dir) { - echo {$test_dir}\n ; -} -echo + foreach ($user_tests as $test_dir) { + echo {$test_dir}\n ; + } + echo = ; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) / run-tests.php
helly Thu Oct 6 05:42:17 2005 EDT Modified files: (Branch: PHP_5_1) /php-srcrun-tests.php Log: - MFH (faillog, streams, counting, ...) http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.226.2.2r2=1.226.2.3ty=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.2 php-src/run-tests.php:1.226.2.3 --- php-src/run-tests.php:1.226.2.2 Sun Sep 11 13:33:15 2005 +++ php-src/run-tests.php Thu Oct 6 05:42:17 2005 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.2 2005/09/11 17:33:15 iliaa Exp $ */ +/* $Id: run-tests.php,v 1.226.2.3 2005/10/06 09:42:17 helly Exp $ */ /* * TODO: @@ -142,17 +142,6 @@ $user_tests = array(); } -// Get info from php -$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; [EMAIL PROTECTED]($info_file); -$php_info = '?php echo -PHP_SAPI: . PHP_SAPI . -PHP_VERSION : . phpversion() . -ZEND_VERSION: . zend_version() . -PHP_OS : . PHP_OS . - . php_uname() . -INI actual : . realpath(get_cfg_var(cfg_file_path)) . -More .INIs : . (function_exists(\'php_ini_scanned_files\') ? str_replace(\n,, php_ini_scanned_files()) : ** not determined **); ?'; -save_text($info_file, $php_info); $ini_overwrites = array( 'output_handler=', 'open_basedir=', @@ -174,43 +163,55 @@ 'auto_append_file=', 'magic_quotes_runtime=0', ); -$info_params = array(); -settings2array($ini_overwrites,$info_params); -settings2params($info_params); -$php_info = `$php $info_params $info_file`; [EMAIL PROTECTED]($info_file); -define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`); - -// check for extensions that need special handling and regenerate -$php_extensions = '?php echo join(,,get_loaded_extensions()); ?'; -save_text($info_file, $php_extensions); -$php_extensions = explode(',',`$php $info_params $info_file`); -$info_params_ex = array( + +function write_information() +{ + global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options; + + // Get info from php + $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; + @unlink($info_file); + $php_info = '?php echo +PHP_SAPI: . PHP_SAPI . +PHP_VERSION : . phpversion() . +ZEND_VERSION: . zend_version() . +PHP_OS : . PHP_OS . - . php_uname() . +INI actual : . realpath(get_cfg_var(cfg_file_path)) . +More .INIs : . (function_exists(\'php_ini_scanned_files\') ? str_replace(\n,, php_ini_scanned_files()) : ** not determined **); ?'; + save_text($info_file, $php_info); + $info_params = array(); + settings2array($ini_overwrites,$info_params); + settings2params($info_params); + $php_info = `$php $pass_options $info_params $info_file`; + @unlink($info_file); + define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`); + + // check for extensions that need special handling and regenerate + $php_extensions = '?php echo join(,,get_loaded_extensions()); ?'; + save_text($info_file, $php_extensions); + $php_extensions = explode(',',`$php $pass_options $info_params $info_file`); + $info_params_ex = array( 'session' = array('session.auto_start=0'), 'zlib' = array('zlib.output_compression=Off'), 'xdebug' = array('xdebug.default_enable=0'), ); -foreach($info_params_ex as $ext = $ini_overwrites_ex) { - if (in_array($ext, $php_extensions)) { - $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); + foreach($info_params_ex as $ext = $ini_overwrites_ex) { + if (in_array($ext, $php_extensions)) { + $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); + } } -} [EMAIL PROTECTED]($info_file); - -// Write test context information. -function write_information() -{ - global $cwd, $php, $php_info, $user_tests; + @unlink($info_file); -echo + // Write test context information. + echo = CWD : $cwd PHP : $php $php_info Extra dirs : ; -foreach ($user_tests as $test_dir) { - echo {$test_dir}\n ; -} -echo + foreach ($user_tests as $test_dir) { + echo {$test_dir}\n ; + } + echo = ; } @@ -218,6 +219,7 @@ // Determine the tests to be run. $test_files = array(); +$redir_tests = array(); $test_results = array(); $PHP_FAILED_TESTS = array('BORKED' = array(), 'FAILED' = array()); @@ -233,22 +235,30 @@ case 'r': case 'l': $test_list = @file($argv[++$i]); -
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] Re: cvs: php-src /ext/date/lib timelib_structs.h
Derick Rethans wrote: On Wed, 5 Oct 2005, Greg Beaver wrote: ... I do believe that: #ifdef PHP_WIN32 #include timelib_config.h #else #include timelib_config.h #endif should fix the windows build without ruining the patch. No, can't do that as PHP_WIN32 is not defined for the standalone library. Not sure if CFLAGS is the proper spot for it (so didnt commit this yet) or if there is another CFLAGS_.. that could be used to limit the include path to ext standard, but I added the following to the data config.w32 to get around the problem in my builds. CHECK_HEADER_ADD_INCLUDE(timelib.h, CFLAGS, ext/date/lib); Rob -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/wddx php_wddx_api.h wddx.c
Jani Taskinen wrote: @@ -422,7 +422,7 @@ tmp = *var; zval_copy_ctor(tmp); convert_to_string(tmp); - snprintf(tmp_buf, Z_STRLEN(tmp), WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, Z_STRLEN(tmp) + WDDX_NUMBER_LEN + 1, WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(tmp); Why not like this: snprintf(tmp_buf, Z_STRLEN(tmp) + sizeof(WDDX_NUMBER) + 1, WDDX_NUMBER, Z_STRVAL(tmp)); Adding extra define just for this seems a bit overkill. (and it is error prone too :) You implying I cant count to 17? I do have toes you know :) Wasn't sure if it was looking for max number to write or maximum possible size there so err'd on side of caution. If max possible size, then what about just WDDX_BUF_LEN? (though not to be used in other spot). Rob -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/wddx php_wddx_api.h wddx.c
On Thu, 6 Oct 2005, Rob Richards wrote: Jani Taskinen wrote: @@ -422,7 +422,7 @@ tmp = *var; zval_copy_ctor(tmp); convert_to_string(tmp); - snprintf(tmp_buf, Z_STRLEN(tmp), WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, Z_STRLEN(tmp) + WDDX_NUMBER_LEN + 1, WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(tmp); Why not like this: snprintf(tmp_buf, Z_STRLEN(tmp) + sizeof(WDDX_NUMBER) + 1, WDDX_NUMBER, Z_STRVAL(tmp)); Adding extra define just for this seems a bit overkill. (and it is error prone too :) You implying I cant count to 17? I do have toes you know :) Yeah, but you might not have all of them, how could I know? :) Wasn't sure if it was looking for max number to write or maximum possible size there so err'd on side of caution. If max possible size, then what about just WDDX_BUF_LEN? (though not to be used in other spot). I don't feel that strong about this..just anticipated what Andi will say when he sees this patch. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard config.w32 /ext/wddx config.w32
derick Thu Oct 6 09:03:31 2005 EDT Modified files: /php-src/ext/standard config.w32 /php-src/ext/wddx config.w32 Log: - Fixed Windows build (patch by Mike) http://cvs.php.net/diff.php/php-src/ext/standard/config.w32?r1=1.4r2=1.5ty=u Index: php-src/ext/standard/config.w32 diff -u php-src/ext/standard/config.w32:1.4 php-src/ext/standard/config.w32:1.5 --- php-src/ext/standard/config.w32:1.4 Sun Jun 19 18:15:26 2005 +++ php-src/ext/standard/config.w32 Thu Oct 6 09:03:29 2005 @@ -1,9 +1,11 @@ // vim:ft=javascript -// $Id: config.w32,v 1.4 2005/06/19 22:15:26 derick Exp $ +// $Id: config.w32,v 1.5 2005/10/06 13:03:29 derick Exp $ ARG_WITH(config-file-scan-dir, Dir to check for additional php ini files, ); AC_DEFINE(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR); +CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_STANDARD, ext/date/lib); + EXTENSION(standard, array.c base64.c basic_functions.c browscap.c \ crc32.c crypt.c cyr_convert.c datetime.c dir.c dl.c dns.c exec.c \ file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \ http://cvs.php.net/diff.php/php-src/ext/wddx/config.w32?r1=1.2r2=1.3ty=u Index: php-src/ext/wddx/config.w32 diff -u php-src/ext/wddx/config.w32:1.2 php-src/ext/wddx/config.w32:1.3 --- php-src/ext/wddx/config.w32:1.2 Mon Dec 22 08:16:41 2003 +++ php-src/ext/wddx/config.w32 Thu Oct 6 09:03:31 2005 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.2 2003/12/22 13:16:41 wez Exp $ +// $Id: config.w32,v 1.3 2005/10/06 13:03:31 derick Exp $ // vim:ft=javascript ARG_WITH(wddx, WDDX support, yes); @@ -7,6 +7,7 @@ EXTENSION(wddx, wddx.c); AC_DEFINE(HAVE_WDDX, 1, WDDX support); ADD_EXTENSION_DEP('wddx', 'libxml'); + CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_WDDX, ext/date/lib); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard config.w32 /ext/wddx config.w32
derick Thu Oct 6 09:03:43 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/standard config.w32 /php-src/ext/wddx config.w32 Log: - MFH: Fixed Windows build (patch by Mike) http://cvs.php.net/diff.php/php-src/ext/standard/config.w32?r1=1.4r2=1.4.2.1ty=u Index: php-src/ext/standard/config.w32 diff -u php-src/ext/standard/config.w32:1.4 php-src/ext/standard/config.w32:1.4.2.1 --- php-src/ext/standard/config.w32:1.4 Sun Jun 19 18:15:26 2005 +++ php-src/ext/standard/config.w32 Thu Oct 6 09:03:43 2005 @@ -1,9 +1,11 @@ // vim:ft=javascript -// $Id: config.w32,v 1.4 2005/06/19 22:15:26 derick Exp $ +// $Id: config.w32,v 1.4.2.1 2005/10/06 13:03:43 derick Exp $ ARG_WITH(config-file-scan-dir, Dir to check for additional php ini files, ); AC_DEFINE(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR); +CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_STANDARD, ext/date/lib); + EXTENSION(standard, array.c base64.c basic_functions.c browscap.c \ crc32.c crypt.c cyr_convert.c datetime.c dir.c dl.c dns.c exec.c \ file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \ http://cvs.php.net/diff.php/php-src/ext/wddx/config.w32?r1=1.2r2=1.2.4.1ty=u Index: php-src/ext/wddx/config.w32 diff -u php-src/ext/wddx/config.w32:1.2 php-src/ext/wddx/config.w32:1.2.4.1 --- php-src/ext/wddx/config.w32:1.2 Mon Dec 22 08:16:41 2003 +++ php-src/ext/wddx/config.w32 Thu Oct 6 09:03:43 2005 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.2 2003/12/22 13:16:41 wez Exp $ +// $Id: config.w32,v 1.2.4.1 2005/10/06 13:03:43 derick Exp $ // vim:ft=javascript ARG_WITH(wddx, WDDX support, yes); @@ -7,6 +7,7 @@ EXTENSION(wddx, wddx.c); AC_DEFINE(HAVE_WDDX, 1, WDDX support); ADD_EXTENSION_DEP('wddx', 'libxml'); + CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_WDDX, ext/date/lib); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/classes interfaces_003.phpt
helly Thu Oct 6 14:32:28 2005 EDT Added files: /php-src/tests/classes interfaces_003.phpt Log: - Add new test http://cvs.php.net/co.php/php-src/tests/classes/interfaces_003.phpt?r=1.1p=1 Index: php-src/tests/classes/interfaces_003.phpt +++ php-src/tests/classes/interfaces_003.phpt --TEST-- ZE2 interface and __construct --FILE-- ?php class MyObject {} interface MyInterface { public function __construct(Object $o); } class MyTestClass implements MyInterface { public function __construct(Object $o) { } } $obj = new MyTestClass; class MyTestFail { public function __construct() { } } ? ===DONE=== --EXPECTF-- Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /tests/classes interfaces_003.phpt
helly Thu Oct 6 14:34:16 2005 EDT Added files: (Branch: PHP_5_1) /php-src/tests/classes interfaces_003.phpt Log: - Add new test http://cvs.php.net/co.php/php-src/tests/classes/interfaces_003.phpt?r=1.1p=1 Index: php-src/tests/classes/interfaces_003.phpt +++ php-src/tests/classes/interfaces_003.phpt --TEST-- ZE2 interface and __construct --FILE-- ?php class MyObject {} interface MyInterface { public function __construct(Object $o); } class MyTestClass implements MyInterface { public function __construct(Object $o) { } } $obj = new MyTestClass; class MyTestFail { public function __construct() { } } ? ===DONE=== --EXPECTF-- Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/classes tostring_001.phpt
helly Thu Oct 6 14:37:21 2005 EDT Modified files: /php-src/tests/classes tostring_001.phpt Log: - Fix test http://cvs.php.net/diff.php/php-src/tests/classes/tostring_001.phpt?r1=1.2r2=1.3ty=u Index: php-src/tests/classes/tostring_001.phpt diff -u php-src/tests/classes/tostring_001.phpt:1.2 php-src/tests/classes/tostring_001.phpt:1.3 --- php-src/tests/classes/tostring_001.phpt:1.2 Tue Sep 27 04:46:53 2005 +++ php-src/tests/classes/tostring_001.phpt Thu Oct 6 14:37:19 2005 @@ -5,16 +5,33 @@ --FILE-- ?php -class test1 { +function my_error_handler($errno, $errstr, $errfile, $errline) { + var_dump($errstr); } -class test2 { -function __toString() { +set_error_handler('my_error_handler'); + +class test1 +{ +} + +class test2 +{ +function __toString() +{ echo __METHOD__ . ()\n; return Converted\n; } } +class test3 +{ +function __toString() +{ + echo __METHOD__ . ()\n; +return 42; +} +} echo test1\n; $o = new test1; print_r($o); @@ -34,11 +51,11 @@ echo test5\n; echo 1 . $o; -echo 1 . $o; +echo 1 , $o; echo test6\n; -echo $o.$o; -echo $o,$o; +echo $o . $o; +echo $o , $o; echo test7\n; $ar = array(); @@ -51,14 +68,21 @@ echo test9\n; echo sprintf(%s, $o); + +echo test10\n; +$o = new test3; +var_dump($o); +echo $o; + ? -DONE! +DONE --EXPECTF-- test1 test1 Object ( ) -string(12) Object id #%d +string(54) Object of class test1 could not be converted to string +string(0) object(test1)#%d (0) { } test2 @@ -67,7 +91,7 @@ ) test2::__toString() Converted -object(test2)#%d (%d) { +object(test2)#%d (0) { } test3 test2::__toString() @@ -78,8 +102,8 @@ test5 test2::__toString() 1Converted -test2::__toString() -1Converted +1test2::__toString() +Converted test6 test2::__toString() test2::__toString() @@ -91,8 +115,7 @@ Converted test7 test2::__toString() - -Warning: Illegal offset type in %stostring_001.php on line %d +string(19) Illegal offset type test8 test2::__toString() string(9) Converted @@ -101,53 +124,9 @@ test9 test2::__toString() Converted -DONE! ---UEXPECTF-- -test1 -test1 Object -( -) -string(12) Object id #%d -object(test1)#%d (0) { -} -test2 -test2 Object -( -) -test2::__toString() -Converted -object(test2)#%d (%d) { +test10 +object(test3)#%d (0) { } -test3 -test2::__toString() -Converted -test4 -test2::__toString() -string:Converted -test5 -test2::__toString() -1Converted -test2::__toString() -1Converted -test6 -test2::__toString() -test2::__toString() -Converted -Converted -test2::__toString() -Converted -test2::__toString() -Converted -test7 -test2::__toString() - -Warning: Illegal offset type in %stostring_001.php on line %d -test8 -test2::__toString() -unicode(9) Converted -test2::__toString() -unicode(9) Converted -test9 -test2::__toString() -Converted -DONE! +test3::__toString() +string(53) Method test3::__toString() must return a string value +DONE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/classes tostring_003.phpt
helly Thu Oct 6 14:41:02 2005 EDT Modified files: /php-src/tests/classes tostring_003.phpt Log: - Add new test http://cvs.php.net/diff.php/php-src/tests/classes/tostring_003.phpt?r1=1.2r2=1.3ty=u Index: php-src/tests/classes/tostring_003.phpt diff -u php-src/tests/classes/tostring_003.phpt:1.2 php-src/tests/classes/tostring_003.phpt:1.3 --- php-src/tests/classes/tostring_003.phpt:1.2 Tue Sep 27 04:50:23 2005 +++ php-src/tests/classes/tostring_003.phpt Thu Oct 6 14:41:01 2005 @@ -32,8 +32,4 @@ ? DONE --EXPECTF-- -string(5) Damn! -DONE ---UEXPECTF-- -unicode(5) Damn! -DONE +Fatal error: Object of class Test could not be converted to string in %stostring_003.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/wddx php_wddx_api.h wddx.c
rrichards Thu Oct 6 14:47:48 2005 EDT Modified files: /php-src/ext/wddx wddx.c php_wddx_api.h Log: use sizeof instead of define http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=1.124r2=1.125ty=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.124 php-src/ext/wddx/wddx.c:1.125 --- php-src/ext/wddx/wddx.c:1.124 Wed Oct 5 18:35:11 2005 +++ php-src/ext/wddx/wddx.c Thu Oct 6 14:47:46 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.124 2005/10/05 22:35:11 rrichards Exp $ */ +/* $Id: wddx.c,v 1.125 2005/10/06 18:47:46 rrichards Exp $ */ #include php.h @@ -423,7 +423,7 @@ tmp = *var; zval_copy_ctor(tmp); convert_to_string(tmp); - snprintf(tmp_buf, Z_STRLEN(tmp) + WDDX_NUMBER_LEN + 1, WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, sizeof(tmp_buf), WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(tmp); php_wddx_add_chunk(packet, tmp_buf); @@ -625,8 +625,8 @@ if (name) { name_esc = php_escape_html_entities(name, name_len, name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC); - tmp_buf = emalloc(name_esc_len + WDDX_VAR_S_LEN + 1); - snprintf(tmp_buf, name_esc_len + WDDX_VAR_S_LEN + 1, WDDX_VAR_S, name_esc); + tmp_buf = emalloc(name_esc_len + sizeof(WDDX_VAR_S)); + snprintf(tmp_buf, name_esc_len + sizeof(WDDX_VAR_S), WDDX_VAR_S, name_esc); php_wddx_add_chunk(packet, tmp_buf); efree(tmp_buf); efree(name_esc); http://cvs.php.net/diff.php/php-src/ext/wddx/php_wddx_api.h?r1=1.25r2=1.26ty=u Index: php-src/ext/wddx/php_wddx_api.h diff -u php-src/ext/wddx/php_wddx_api.h:1.25 php-src/ext/wddx/php_wddx_api.h:1.26 --- php-src/ext/wddx/php_wddx_api.h:1.25Wed Oct 5 18:35:11 2005 +++ php-src/ext/wddx/php_wddx_api.h Thu Oct 6 14:47:47 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_wddx_api.h,v 1.25 2005/10/05 22:35:11 rrichards Exp $ */ +/* $Id: php_wddx_api.h,v 1.26 2005/10/06 18:47:47 rrichards Exp $ */ #ifndef PHP_WDDX_API_H #define PHP_WDDX_API_H @@ -47,9 +47,6 @@ #define WDDX_VAR_S var name='%s' #define WDDX_VAR_E /var -#define WDDX_NUMBER_LEN17 -#define WDDX_VAR_S_LEN 13 - #define php_wddx_add_chunk(packet, str)smart_str_appends(packet, str) #define php_wddx_add_chunk_ex(packet, str, len) smart_str_appendl(packet, str, len) #define php_wddx_add_chunk_static(packet, str) smart_str_appendl(packet, str, sizeof(str)-1) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/wddx php_wddx_api.h wddx.c
rrichards Thu Oct 6 14:48:19 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/wddx wddx.c php_wddx_api.h Log: MFH: use sizeof instead of define http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=1.119.2.4r2=1.119.2.5ty=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.4 php-src/ext/wddx/wddx.c:1.119.2.5 --- php-src/ext/wddx/wddx.c:1.119.2.4 Wed Oct 5 18:36:10 2005 +++ php-src/ext/wddx/wddx.c Thu Oct 6 14:48:19 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.119.2.4 2005/10/05 22:36:10 rrichards Exp $ */ +/* $Id: wddx.c,v 1.119.2.5 2005/10/06 18:48:19 rrichards Exp $ */ #include php.h @@ -422,7 +422,7 @@ tmp = *var; zval_copy_ctor(tmp); convert_to_string(tmp); - snprintf(tmp_buf, Z_STRLEN(tmp) + WDDX_NUMBER_LEN + 1, WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, sizeof(tmp_buf), WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(tmp); php_wddx_add_chunk(packet, tmp_buf); @@ -624,8 +624,8 @@ if (name) { name_esc = php_escape_html_entities(name, name_len, name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC); - tmp_buf = emalloc(name_esc_len + WDDX_VAR_S_LEN + 1); - snprintf(tmp_buf, name_esc_len + WDDX_VAR_S_LEN + 1, WDDX_VAR_S, name_esc); + tmp_buf = emalloc(name_esc_len + sizeof(WDDX_VAR_S)); + snprintf(tmp_buf, name_esc_len + sizeof(WDDX_VAR_S), WDDX_VAR_S, name_esc); php_wddx_add_chunk(packet, tmp_buf); efree(tmp_buf); efree(name_esc); http://cvs.php.net/diff.php/php-src/ext/wddx/php_wddx_api.h?r1=1.23.2.1r2=1.23.2.2ty=u Index: php-src/ext/wddx/php_wddx_api.h diff -u php-src/ext/wddx/php_wddx_api.h:1.23.2.1 php-src/ext/wddx/php_wddx_api.h:1.23.2.2 --- php-src/ext/wddx/php_wddx_api.h:1.23.2.1Wed Oct 5 18:36:10 2005 +++ php-src/ext/wddx/php_wddx_api.h Thu Oct 6 14:48:19 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_wddx_api.h,v 1.23.2.1 2005/10/05 22:36:10 rrichards Exp $ */ +/* $Id: php_wddx_api.h,v 1.23.2.2 2005/10/06 18:48:19 rrichards Exp $ */ #ifndef PHP_WDDX_API_H #define PHP_WDDX_API_H @@ -47,9 +47,6 @@ #define WDDX_VAR_S var name='%s' #define WDDX_VAR_E /var -#define WDDX_NUMBER_LEN17 -#define WDDX_VAR_S_LEN 13 - #define php_wddx_add_chunk(packet, str)smart_str_appends(packet, str) #define php_wddx_add_chunk_ex(packet, str, len) smart_str_appendl(packet, str, len) #define php_wddx_add_chunk_static(packet, str) smart_str_appendl(packet, str, sizeof(str)-1) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Thu Oct 6 15:51:04 2005 EDT Modified files: /php-srcrun-tests.php Log: - Show whether we execute unicode or native tests http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.236r2=1.237ty=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.236 php-src/run-tests.php:1.237 --- php-src/run-tests.php:1.236 Thu Oct 6 05:39:32 2005 +++ php-src/run-tests.php Thu Oct 6 15:51:03 2005 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.236 2005/10/06 09:39:32 helly Exp $ */ +/* $Id: run-tests.php,v 1.237 2005/10/06 19:51:03 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -171,6 +171,7 @@ PHP_VERSION : . phpversion() . ZEND_VERSION: . zend_version() . PHP_OS : . PHP_OS . - . php_uname() . +UNICODE : . (ini_get(unicode_semantics) ? ON : OFF) . INI actual : . realpath(get_cfg_var(cfg_file_path)) . More .INIs : . (function_exists(\'php_ini_scanned_files\') ? str_replace(\n,, php_ini_scanned_files()) : ** not determined **); ?'; save_text($info_file, $php_info); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / Makefile.global
helly Thu Oct 6 15:51:47 2005 EDT Modified files: /php-srcMakefile.global Log: - Use run-tests.ph -u rather then defining the ini settings one by one http://cvs.php.net/diff.php/php-src/Makefile.global?r1=1.61r2=1.62ty=u Index: php-src/Makefile.global diff -u php-src/Makefile.global:1.61 php-src/Makefile.global:1.62 --- php-src/Makefile.global:1.61Tue Sep 20 05:21:11 2005 +++ php-src/Makefile.global Thu Oct 6 15:51:47 2005 @@ -65,7 +65,7 @@ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC=$(CC) \ - $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'unicode_semantics=on' -d 'unicode.output_encoding=utf-8' $(TESTS); \ + $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -u $(TESTS); \ else \ echo ERROR: Cannot run tests without CLI sapi.; \ fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mhash/tests 003.phpt
helly Thu Oct 6 16:17:15 2005 EDT Modified files: /php-src/ext/mhash/tests003.phpt Log: - Fix test in unicode mode http://cvs.php.net/diff.php/php-src/ext/mhash/tests/003.phpt?r1=1.3r2=1.4ty=u Index: php-src/ext/mhash/tests/003.phpt diff -u php-src/ext/mhash/tests/003.phpt:1.3 php-src/ext/mhash/tests/003.phpt:1.4 --- php-src/ext/mhash/tests/003.phpt:1.3Thu Nov 28 09:13:44 2002 +++ php-src/ext/mhash/tests/003.phptThu Oct 6 16:17:11 2005 @@ -4,38 +4,6 @@ ?php include skip.inc; ? ---FILE-- -?php - -$supported_hash_al = array( -MHASH_MD5 = \x15N¯2Íé4z¡P¹ÀFë\x06æ \x0CTyªzcg®hµààt^W\x09þÞ-ésA7Yú§:Ìí\x10w´Ý²xdãqëS³©Õ^Ò«UÈ,þÛè: aÇÙ×zä\x06\x1CS\x01, -MHASH_SHA1 = Ý1\\p\x06\x1D\x07E]SÂû\x0B\x08ß\x0Caªf\\\x1A±§\x01ú\x10T#\$¨2¥ä\x06³xc\x0Aº=\x16æ\IJ\x0E®'NÎÔ½÷nË\x08J3É\x15+H\x13\x1D0§[\x00§À[ñÿê¿Y»\x12qÄØ¡\x19¸K¯mI, -MHASH_HAVAL256 = ÞG\x00Õé¢NÏPwÖ\x0CH6W¥Ù«+·õ,Êö\x1C\x0DgdZUþá\x07)oAiÉ[Nað®îú²d TÁ\x17\x1F°¢ü2ªZîÓÕÁUÓ46}IYb,ÚÞþC®\x17½\x1AuùÔþ÷{ñ¾[x, -MHASH_HAVAL224 = \\Jÿ=ZÖ\x08ö\x08Èêçyî8haÆ\x0Aó×p³¦g|yÂÚÜ«qÝàÀ\x19\x1E\x06«)[EMAIL PROTECTED] m`G-2ÃI, -MHASH_HAVAL192 = \àÂq\x02 .ùA\x07»/\x1Eá2°d\x17Ëû\x1C2æXv\x0Bp½Å±Å%\x03\x16(ÂC;î+\x08p«z8®²\x12\x15\x13NÁ\x08u¹©dd)qï³Ùºùv_ÙæÖMINª¯çà xLtº±Ç, -MHASH_HAVAL160 = Öåðï\x07óúÌídní¶6GXìÞmÆû\x06\x1E\x00¤õη#÷¡5M\míiÁ\x1D1\$\x0Eù|XO)Y;¿=ÓÊ°¸y.³Ø`\Ê`\x02ëÐÙ´B Ô¯ ¾Òµ©kG¹¸ÊÉ\x19Á\x17~Ä\x0D~, -MHASH_RIPEMD160 = äÕÛFòxâ¹\x0DÇ5ÉÏ\x02\x0a\x1D[\x19¦gDXgwÔÜ¡DÔÅb¯ùjBëö°ê7ù¡û]é¶GíÃ[\x14G`^\x1B«Ã\x08Kç \x11\x17ë3C-ABâ%ß\x04K\x03??öK´¡¤ù, -MHASH_GOST = ÀDöi½~C=wÆý\x17BÙß\x15}øs¾M\x01äd|\x014hYç\[EMAIL PROTECTED]@sÞ¨y¾ýN%d÷×\x09¶FD\x0a\x12\x12Pà\x0FÇÕ}E©À~â:pOô\x0DpwìR{\x19M, -MHASH_TIGER = gêÉ{Ê\nG±ö/3däÎ#7`þ2UöBQ/Óy)ºÌñçX#k'h¤ÂÀÀnä/¥÷E¸©ÛÀp*M1 VÄÉKÚyºO`Õ ×øM¨¢6Ô|\ª, -MHASH_CRC32 = [EMAIL PROTECTED]_YïèoQÅÒÐ1[Fq\®\x08ÁÌÝféVÈ8\x08ã¥EöîE¤M¼:Ⱥ ¥rðk*±HÚu±è/}ßÛh3iW»ñJ?vui ¥=ÕW\üó, -MHASH_CRC32B= µl«e¦}û*©]¶F×6\x13bCÍË. I¯\x0FjÎ¥0ÐÛ\x0D\x1FÆ.Qy羶tiý°xbØ\$}\x0BõÈ´ ×ϬÈDÅDK \x13é1uLðÝ6§¡`÷æÉ|Ecñ\x04°, -); - -foreach ($supported_hash_al as $hash=$wanted) { - $passwd = str_repeat($hash, 10); - $salt = str_repeat($hash, 2); - $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100); - if (!strcmp($result, $wanted)) { - echo $hash\nok\n; - } else { - echo $hash: ; - var_dump(bin2hex($wanted)); - echo $hash: ; - var_dump(bin2hex($result)); - } - echo \n; -} -? --EXPECT-- MHASH_MD5 ok @@ -69,3 +37,35 @@ MHASH_CRC32B ok +--FILE-- +?php + +$supported_hash_al = array( +MHASH_MD5 = b\x15N¯2Íé4z¡P¹ÀFë\x06æ \x0CTyªzcg®hµààt^W\x09þÞ-ésA7Yú§:Ìí\x10w´Ý²xdãqëS³©Õ^Ò«UÈ,þÛè: aÇÙ×zä\x06\x1CS\x01, +MHASH_SHA1 = bÝ1\\p\x06\x1D\x07E]SÂû\x0B\x08ß\x0Caªf\\\x1A±§\x01ú\x10T#\$¨2¥ä\x06³xc\x0Aº=\x16æ\IJ\x0E®'NÎÔ½÷nË\x08J3É\x15+H\x13\x1D0§[\x00§À[ñÿê¿Y»\x12qÄØ¡\x19¸K¯mI, +MHASH_HAVAL256 = bÞG\x00Õé¢NÏPwÖ\x0CH6W¥Ù«+·õ,Êö\x1C\x0DgdZUþá\x07)oAiÉ[Nað®îú²d TÁ\x17\x1F°¢ü2ªZîÓÕÁUÓ46}IYb,ÚÞþC®\x17½\x1AuùÔþ÷{ñ¾[x, +MHASH_HAVAL224 = b\\Jÿ=ZÖ\x08ö\x08Èêçyî8haÆ\x0Aó×p³¦g|yÂÚÜ«qÝàÀ\x19\x1E\x06«)[EMAIL PROTECTED] m`G-2ÃI, +MHASH_HAVAL192 = b\àÂq\x02 .ùA\x07»/\x1Eá2°d\x17Ëû\x1C2æXv\x0Bp½Å±Å%\x03\x16(ÂC;î+\x08p«z8®²\x12\x15\x13NÁ\x08u¹©dd)qï³Ùºùv_ÙæÖMINª¯çà xLtº±Ç, +MHASH_HAVAL160 = bÖåðï\x07óúÌídní¶6GXìÞmÆû\x06\x1E\x00¤õη#÷¡5M\míiÁ\x1D1\$\x0Eù|XO)Y;¿=ÓÊ°¸y.³Ø`\Ê`\x02ëÐÙ´B Ô¯ ¾Òµ©kG¹¸ÊÉ\x19Á\x17~Ä\x0D~, +MHASH_RIPEMD160 = bäÕÛFòxâ¹\x0DÇ5ÉÏ\x02\x0a\x1D[\x19¦gDXgwÔÜ¡DÔÅb¯ùjBëö°ê7ù¡û]é¶GíÃ[\x14G`^\x1B«Ã\x08Kç \x11\x17ë3C-ABâ%ß\x04K\x03??öK´¡¤ù, +MHASH_GOST = bÀDöi½~C=wÆý\x17BÙß\x15}øs¾M\x01äd|\x014hYç\[EMAIL PROTECTED]@sÞ¨y¾ýN%d÷×\x09¶FD\x0a\x12\x12Pà\x0FÇÕ}E©À~â:pOô\x0DpwìR{\x19M, +MHASH_TIGER = bgêÉ{Ê\nG±ö/3däÎ#7`þ2UöBQ/Óy)ºÌñçX#k'h¤ÂÀÀnä/¥÷E¸©ÛÀp*M1 VÄÉKÚyºO`Õ×øM¨¢6Ô|\ª, +MHASH_CRC32 = b[EMAIL PROTECTED]_YïèoQÅÒÐ1[Fq\®\x08ÁÌÝféVÈ8\x08ã¥EöîE¤M¼:Ⱥ ¥rðk*±HÚu±è/}ßÛh3iW»ñJ?vui ¥=ÕW\üó, +MHASH_CRC32B= bµl«e¦}û*©]¶F×6\x13bCÍË. I¯\x0FjÎ¥0ÐÛ\x0D\x1FÆ.Qy羶tiý°xbØ\$}\x0BõÈ´ ×ϬÈDÅDK \x13é1uLðÝ6§¡`÷æÉ|Ecñ\x04°, +); + +foreach ($supported_hash_al as $hash=$wanted) { + $passwd = str_repeat($hash, 10); + $salt = str_repeat($hash, 2); + $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100); + if (!strcmp($result, $wanted)) { + echo $hash\nok\n; + } else { + echo $hash: ; + var_dump(bin2hex($wanted)); + echo $hash: ; + var_dump(bin2hex($result)); + } + echo \n; +} +? -- PHP CVS Mailing List
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c /sapi/cli php_cli.c
johannesThu Oct 6 16:29:14 2005 EDT Modified files: /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: - Fix #34557 php -m exits with error 1 http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.267r2=1.268ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267 php-src/sapi/cgi/cgi_main.c:1.268 --- php-src/sapi/cgi/cgi_main.c:1.267 Wed Aug 3 07:12:17 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Oct 6 16:29:09 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267 2005/08/03 11:12:17 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.268 2005/10/06 20:29:09 johannes Exp $ */ #include php.h #include php_globals.h @@ -1366,7 +1366,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'l': /* syntax check mode */ @@ -1384,7 +1384,7 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; #if 0 /* not yet operational, see also below ... */ @@ -1417,7 +1417,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2005 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'w': http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.130r2=1.131ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.130 php-src/sapi/cli/php_cli.c:1.131 --- php-src/sapi/cli/php_cli.c:1.130Mon Oct 3 07:54:46 2005 +++ php-src/sapi/cli/php_cli.c Thu Oct 6 16:29:13 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.130 2005/10/03 11:54:46 johannes Exp $ */ +/* $Id: php_cli.c,v 1.131 2005/10/06 20:29:13 johannes Exp $ */ #include php.h #include php_globals.h @@ -704,8 +704,9 @@ php_output_activate(TSRMLS_C); php_cli_usage(argv[0]); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'i': /* php info quit */ @@ -714,7 +715,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; case 'm': /* list compiled in modules */ @@ -726,8 +727,9 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'v': /* show php version quit */ if (php_request_startup(TSRMLS_C)==FAILURE) { @@ -739,7 +741,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2005 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cgi cgi_main.c /sapi/cli php_cli.c
johannesThu Oct 6 16:29:41 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: - MFH: Fix #34557 php -m exits with error 1 http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.267r2=1.267.2.1ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267 php-src/sapi/cgi/cgi_main.c:1.267.2.1 --- php-src/sapi/cgi/cgi_main.c:1.267 Wed Aug 3 07:12:17 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Oct 6 16:29:40 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267 2005/08/03 11:12:17 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.1 2005/10/06 20:29:40 johannes Exp $ */ #include php.h #include php_globals.h @@ -1366,7 +1366,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'l': /* syntax check mode */ @@ -1384,7 +1384,7 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; #if 0 /* not yet operational, see also below ... */ @@ -1417,7 +1417,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2005 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'w': http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.129r2=1.129.2.1ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129 php-src/sapi/cli/php_cli.c:1.129.2.1 --- php-src/sapi/cli/php_cli.c:1.129Mon Aug 8 12:49:44 2005 +++ php-src/sapi/cli/php_cli.c Thu Oct 6 16:29:41 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129 2005/08/08 16:49:44 sniper Exp $ */ +/* $Id: php_cli.c,v 1.129.2.1 2005/10/06 20:29:41 johannes Exp $ */ #include php.h #include php_globals.h @@ -697,8 +697,9 @@ php_output_activate(TSRMLS_C); php_cli_usage(argv[0]); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'i': /* php info quit */ @@ -707,7 +708,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; case 'm': /* list compiled in modules */ @@ -719,8 +720,9 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'v': /* show php version quit */ if (php_request_startup(TSRMLS_C)==FAILURE) { @@ -732,7 +734,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2005 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /sapi/cgi cgi_main.c /sapi/cli php_cli.c
johannesThu Oct 6 16:36:46 2005 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: - MFH: Fix #34557 php -m exits with error 1 http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.490r2=1.1760.2.491ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.490 php-src/NEWS:1.1760.2.491 --- php-src/NEWS:1.1760.2.490 Tue Oct 4 16:49:33 2005 +++ php-src/NEWSThu Oct 6 16:36:42 2005 @@ -7,6 +7,7 @@ - Fixed bug #34643 (wsdl default value has no effect). (Dmitry) - Fixed bug #34617 (zend_deactivate: objects_store used after zend_objects_store_destroy is called). (Dmitry) +- Fixed bug #34557 (php -m exits with error 1). (Johannes) - Fixed bug #34505 (Possible memory corruption when unmangling properties with empty names). (Tony) - Fixed bug #34478 (Incorrect parsing of url's fragment (#...)). (Dmitry) http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.256.2.6r2=1.256.2.7ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.256.2.6 php-src/sapi/cgi/cgi_main.c:1.256.2.7 --- php-src/sapi/cgi/cgi_main.c:1.256.2.6 Thu Apr 28 10:24:21 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Oct 6 16:36:44 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.256.2.6 2005/04/28 14:24:21 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.256.2.7 2005/10/06 20:36:44 johannes Exp $ */ #include php.h #include php_globals.h @@ -1374,7 +1374,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'l': /* syntax check mode */ @@ -1392,7 +1392,7 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; #if 0 /* not yet operational, see also below ... */ @@ -1425,7 +1425,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2004 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'w': http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.113.2.2r2=1.113.2.3ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.113.2.2 php-src/sapi/cli/php_cli.c:1.113.2.3 --- php-src/sapi/cli/php_cli.c:1.113.2.2Tue Mar 22 10:09:20 2005 +++ php-src/sapi/cli/php_cli.c Thu Oct 6 16:36:45 2005 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.113.2.2 2005/03/22 15:09:20 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.113.2.3 2005/10/06 20:36:45 johannes Exp $ */ #include php.h #include php_globals.h @@ -665,8 +665,9 @@ php_output_activate(TSRMLS_C); php_cli_usage(argv[0]); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'i': /* php info quit */ @@ -675,7 +676,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; case 'm': /* list compiled in modules */ @@ -687,8 +688,9 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'v': /* show php version
[PHP-CVS] cvs: php-src /ext/curl interface.c /ext/gd gd.c gd_ctx.c
iliaa Thu Oct 6 16:37:25 2005 EDT Modified files: /php-src/ext/gd gd_ctx.c gd.c /php-src/ext/curl interface.c Log: Added missing safe_mode checks. http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=1.22r2=1.23ty=u Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.22 php-src/ext/gd/gd_ctx.c:1.23 --- php-src/ext/gd/gd_ctx.c:1.22Wed Aug 3 10:07:13 2005 +++ php-src/ext/gd/gd_ctx.c Thu Oct 6 16:37:22 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: gd_ctx.c,v 1.22 2005/08/03 14:07:13 sniper Exp $ */ +/* $Id: gd_ctx.c,v 1.23 2005/10/06 20:37:22 iliaa Exp $ */ #include php_gd.h @@ -82,7 +82,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.314r2=1.315ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.314 php-src/ext/gd/gd.c:1.315 --- php-src/ext/gd/gd.c:1.314 Sun Oct 2 14:06:12 2005 +++ php-src/ext/gd/gd.c Thu Oct 6 16:37:22 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.314 2005/10/02 18:06:12 pajoye Exp $ */ +/* $Id: gd.c,v 1.315 2005/10/06 20:37:22 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1709,7 +1709,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.64r2=1.65ty=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.64 php-src/ext/curl/interface.c:1.65 --- php-src/ext/curl/interface.c:1.64 Wed Oct 5 10:32:19 2005 +++ php-src/ext/curl/interface.cThu Oct 6 16:37:25 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.64 2005/10/05 14:32:19 iliaa Exp $ */ +/* $Id: interface.c,v 1.65 2005/10/06 20:37:25 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -65,7 +65,7 @@ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ - if (PG(open_basedir) *PG(open_basedir) \ + if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) \ strncasecmp(str, file://, sizeof(file://) - 1) == 0) \ { \ php_url *tmp_url; \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /sapi/cgi cgi_main.c /sapi/cli php_cli.c
johannesThu Oct 6 16:39:29 2005 EDT Modified files: (Branch: PHP_4_4) /php-srcNEWS /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: - MFH: Fix #34557 php -m exits with error 1 http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.47r2=1.1247.2.920.2.48ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.47 php-src/NEWS:1.1247.2.920.2.48 --- php-src/NEWS:1.1247.2.920.2.47 Wed Oct 5 10:34:38 2005 +++ php-src/NEWSThu Oct 6 16:39:24 2005 @@ -13,6 +13,7 @@ - Fixed bug #34645 (ctype corrupts memory when validating large numbers). (Ilia) - Fixed bug #34565 (mb_send_mail does not fetch mail.force_extra_parameters). (Marco, Ilia) +- Fixed bug #34557 (php -m exits with error 1). (Johannes) - Fixed bug #34456 (Possible crash inside pspell extension). (Nuno) - Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno) - Fixed bug #34307 (on_modify handler not called to set the default value if http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.68r2=1.190.2.68.2.1ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.68 php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.1 --- php-src/sapi/cgi/cgi_main.c:1.190.2.68 Thu Apr 28 10:24:47 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Oct 6 16:39:26 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.190.2.68 2005/04/28 14:24:47 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.190.2.68.2.1 2005/10/06 20:39:26 johannes Exp $ */ #include php.h #include php_globals.h @@ -1395,7 +1395,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'l': /* syntax check mode */ @@ -1413,7 +1413,7 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; #if 0 /* not yet operational, see also below ... */ @@ -1446,7 +1446,7 @@ php_printf(PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2004 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif php_end_ob_buffers(1 TSRMLS_CC); - exit(1); + exit(0); break; case 'w': http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.51.2.37r2=1.51.2.37.2.1ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.51.2.37 php-src/sapi/cli/php_cli.c:1.51.2.37.2.1 --- php-src/sapi/cli/php_cli.c:1.51.2.37Tue Mar 22 10:09:36 2005 +++ php-src/sapi/cli/php_cli.c Thu Oct 6 16:39:26 2005 @@ -623,8 +623,9 @@ php_output_activate(TSRMLS_C); php_cli_usage(argv[0]); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'i': /* php info quit */ @@ -633,7 +634,7 @@ } php_print_info(0x TSRMLS_CC); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; + exit_status=0; goto out; case 'm': /* list compiled in modules */ @@ -645,8 +646,9 @@ print_extensions(TSRMLS_C); php_printf(\n); php_end_ob_buffers(1 TSRMLS_CC); - exit_status=1; - goto err; + exit_status=0; + zend_ini_deactivate(TSRMLS_C); + goto out_err; case 'v': /* show php version quit */ if (php_request_startup(TSRMLS_C)==FAILURE) { @@ -658,7 +660,7 @@ php_printf(PHP %s (%s) (built: %s
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/curl interface.c /ext/gd gd.c gd_ctx.c
iliaa Thu Oct 6 16:43:00 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/gd gd_ctx.c gd.c /php-src/ext/curl interface.c Log: MFH: Added missing safe_mode checks. http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=1.20r2=1.20.2.1ty=u Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.20 php-src/ext/gd/gd_ctx.c:1.20.2.1 --- php-src/ext/gd/gd_ctx.c:1.20Wed Jan 28 11:25:12 2004 +++ php-src/ext/gd/gd_ctx.c Thu Oct 6 16:42:56 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: gd_ctx.c,v 1.20 2004/01/28 16:25:12 martin Exp $ */ +/* $Id: gd_ctx.c,v 1.20.2.1 2005/10/06 20:42:56 iliaa Exp $ */ #include php_gd.h @@ -82,7 +82,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.294.2.12r2=1.294.2.13ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.294.2.12 php-src/ext/gd/gd.c:1.294.2.13 --- php-src/ext/gd/gd.c:1.294.2.12 Fri May 6 12:49:04 2005 +++ php-src/ext/gd/gd.c Thu Oct 6 16:42:56 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.294.2.12 2005/05/06 16:49:04 tony2001 Exp $ */ +/* $Id: gd.c,v 1.294.2.13 2005/10/06 20:42:56 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1726,7 +1726,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.46.2.9r2=1.46.2.10ty=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.46.2.9 php-src/ext/curl/interface.c:1.46.2.10 --- php-src/ext/curl/interface.c:1.46.2.9 Wed Oct 5 10:32:57 2005 +++ php-src/ext/curl/interface.cThu Oct 6 16:42:59 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.46.2.9 2005/10/05 14:32:57 iliaa Exp $ */ +/* $Id: interface.c,v 1.46.2.10 2005/10/06 20:42:59 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -62,7 +62,7 @@ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ - if (PG(open_basedir) *PG(open_basedir) \ + if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) \ strncasecmp(str, file://, sizeof(file://) - 1) == 0) \ { \ php_url *tmp_url; \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/curl curl.c /ext/gd gd.c gd_ctx.c
iliaa Thu Oct 6 16:44:58 2005 EDT Modified files: (Branch: PHP_4_4) /php-src/ext/gd gd_ctx.c gd.c /php-src/ext/curl curl.c /php-srcNEWS Log: MFH: Added missing safe_mode checks. http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=1.15.2.2r2=1.15.2.2.4.1ty=u Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.15.2.2 php-src/ext/gd/gd_ctx.c:1.15.2.2.4.1 --- php-src/ext/gd/gd_ctx.c:1.15.2.2Wed Jan 28 11:27:42 2004 +++ php-src/ext/gd/gd_ctx.c Thu Oct 6 16:44:52 2005 @@ -73,7 +73,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.56r2=1.221.2.56.2.1ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.56 php-src/ext/gd/gd.c:1.221.2.56.2.1 --- php-src/ext/gd/gd.c:1.221.2.56 Fri May 6 12:51:54 2005 +++ php-src/ext/gd/gd.c Thu Oct 6 16:44:52 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */ +/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1644,7 +1644,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/curl/curl.c?r1=1.124.2.30.2.1r2=1.124.2.30.2.2ty=u Index: php-src/ext/curl/curl.c diff -u php-src/ext/curl/curl.c:1.124.2.30.2.1 php-src/ext/curl/curl.c:1.124.2.30.2.2 --- php-src/ext/curl/curl.c:1.124.2.30.2.1 Wed Oct 5 10:34:36 2005 +++ php-src/ext/curl/curl.c Thu Oct 6 16:44:55 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: curl.c,v 1.124.2.30.2.1 2005/10/05 14:34:36 iliaa Exp $ */ +/* $Id: curl.c,v 1.124.2.30.2.2 2005/10/06 20:44:55 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -66,7 +66,7 @@ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ - if (PG(open_basedir) *PG(open_basedir) \ + if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) \ strncasecmp(str, file://, sizeof(file://) - 1) == 0) \ { \ php_url *tmp_url; \ http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.48r2=1.1247.2.920.2.49ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.48 php-src/NEWS:1.1247.2.920.2.49 --- php-src/NEWS:1.1247.2.920.2.48 Thu Oct 6 16:39:24 2005 +++ php-src/NEWSThu Oct 6 16:44:56 2005 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ?? ??? 2005, Version 4.4.1 +- Added missing safe_mode checks for image* functions and cURL. (Ilia) - Added missing safe_mode/open_basedir checks for file uploads. (Ilia) - Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia) - Fixed possible crash and/or memory corruption in import_request_variables(). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/curl interface.c /ext/gd gd.c gd_ctx.c
iliaa Thu Oct 6 16:47:43 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/gd gd_ctx.c gd.c /php-src/ext/curl interface.c /php-srcNEWS Log: MFH: Added missing safe_mode checks. http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=1.22r2=1.22.2.1ty=u Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.22 php-src/ext/gd/gd_ctx.c:1.22.2.1 --- php-src/ext/gd/gd_ctx.c:1.22Wed Aug 3 10:07:13 2005 +++ php-src/ext/gd/gd_ctx.c Thu Oct 6 16:47:40 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: gd_ctx.c,v 1.22 2005/08/03 14:07:13 sniper Exp $ */ +/* $Id: gd_ctx.c,v 1.22.2.1 2005/10/06 20:47:40 iliaa Exp $ */ #include php_gd.h @@ -82,7 +82,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.312r2=1.312.2.1ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.312 php-src/ext/gd/gd.c:1.312.2.1 --- php-src/ext/gd/gd.c:1.312 Wed Aug 3 10:07:12 2005 +++ php-src/ext/gd/gd.c Thu Oct 6 16:47:40 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.312 2005/08/03 14:07:12 sniper Exp $ */ +/* $Id: gd.c,v 1.312.2.1 2005/10/06 20:47:40 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1723,7 +1723,7 @@ } if ((argc == 2) || (argc 2 Z_STRLEN_PP(file))) { - if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) !php_checkuid(fn, rb+, CHECKUID_CHECK_FILE_AND_DIR))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid filename '%s', fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.62.2.1r2=1.62.2.2ty=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.1 php-src/ext/curl/interface.c:1.62.2.2 --- php-src/ext/curl/interface.c:1.62.2.1 Wed Oct 5 10:35:30 2005 +++ php-src/ext/curl/interface.cThu Oct 6 16:47:41 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.1 2005/10/05 14:35:30 iliaa Exp $ */ +/* $Id: interface.c,v 1.62.2.2 2005/10/06 20:47:41 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -65,7 +65,7 @@ #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ - if (PG(open_basedir) *PG(open_basedir) \ + if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) \ strncasecmp(str, file://, sizeof(file://) - 1) == 0) \ { \ php_url *tmp_url; \ http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.94r2=1.2027.2.95ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.94 php-src/NEWS:1.2027.2.95 --- php-src/NEWS:1.2027.2.94Wed Oct 5 10:35:30 2005 +++ php-src/NEWSThu Oct 6 16:47:41 2005 @@ -30,6 +30,7 @@ . ext/oracle (Jani, Derick) . ext/ovrimos (Jani, Derick, Pierre) . ext/pfpro (Jani, Derick, Pierre) +- Added missing safe_mode checks for image* functions and cURL. (Ilia) - Added missing safe_mode/open_basedir checks for file uploads. (Ilia) - Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia) - Fixed potential GLOBALS overwrite via import_request_variables() and -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS
sniper Thu Oct 6 17:00:56 2005 EDT Modified files: (Branch: PHP_5_1) /php-srcNEWS Log: BFN http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.95r2=1.2027.2.96ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.95 php-src/NEWS:1.2027.2.96 --- php-src/NEWS:1.2027.2.95Thu Oct 6 16:47:41 2005 +++ php-src/NEWSThu Oct 6 17:00:54 2005 @@ -54,6 +54,7 @@ - Fixed bug #34584 (Segfault with SPL autoload handler). (Marcus) - Fixed bug #34565 (mb_send_mail does not fetch mail.force_extra_parameters). (Marco, Ilia) +- Fixed bug #34557 (php -m exits with error 1). (Johannes) - Fixed bug #34518 (Unset doesn't separate container in CV). (Dmitry) - Fixed bug #34505 (Possible memory corruption when unmangling properties with empty names). (Tony) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main/streams memory.c
helly Thu Oct 6 17:30:58 2005 EDT Modified files: /php-src/main/streams memory.c Log: - Fix issue (endless loop) with temp/memory streams http://cvs.php.net/diff.php/php-src/main/streams/memory.c?r1=1.8r2=1.9ty=u Index: php-src/main/streams/memory.c diff -u php-src/main/streams/memory.c:1.8 php-src/main/streams/memory.c:1.9 --- php-src/main/streams/memory.c:1.8 Wed Aug 3 10:08:42 2005 +++ php-src/main/streams/memory.c Thu Oct 6 17:30:56 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: memory.c,v 1.8 2005/08/03 14:08:42 sniper Exp $ */ +/* $Id: memory.c,v 1.9 2005/10/06 21:30:56 helly Exp $ */ #define _GNU_SOURCE #include php.h @@ -313,7 +313,13 @@ ts = stream-abstract; assert(ts != NULL); - return php_stream_read(ts-innerstream, buf, count); + size_t got = php_stream_read(ts-innerstream, buf, count); + + if (!got) { + stream-eof |= ts-innerstream-eof; + } + + return got; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /main/streams memory.c
helly Thu Oct 6 17:31:15 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/main/streams memory.c Log: - MFH Fix issue (endless loop) with temp/memory streams http://cvs.php.net/diff.php/php-src/main/streams/memory.c?r1=1.6r2=1.6.2.1ty=u Index: php-src/main/streams/memory.c diff -u php-src/main/streams/memory.c:1.6 php-src/main/streams/memory.c:1.6.2.1 --- php-src/main/streams/memory.c:1.6 Thu Jan 8 03:17:59 2004 +++ php-src/main/streams/memory.c Thu Oct 6 17:31:15 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: memory.c,v 1.6 2004/01/08 08:17:59 andi Exp $ */ +/* $Id: memory.c,v 1.6.2.1 2005/10/06 21:31:15 helly Exp $ */ #define _GNU_SOURCE #include php.h @@ -313,7 +313,13 @@ ts = stream-abstract; assert(ts != NULL); - return php_stream_read(ts-innerstream, buf, count); + size_t got = php_stream_read(ts-innerstream, buf, count); + + if (!got) { + stream-eof |= ts-innerstream-eof; + } + + return got; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /main/streams memory.c
helly Thu Oct 6 17:31:25 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/main/streams memory.c Log: - MFH Fix issue (endless loop) with temp/memory streams http://cvs.php.net/diff.php/php-src/main/streams/memory.c?r1=1.8r2=1.8.2.1ty=u Index: php-src/main/streams/memory.c diff -u php-src/main/streams/memory.c:1.8 php-src/main/streams/memory.c:1.8.2.1 --- php-src/main/streams/memory.c:1.8 Wed Aug 3 10:08:42 2005 +++ php-src/main/streams/memory.c Thu Oct 6 17:31:25 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: memory.c,v 1.8 2005/08/03 14:08:42 sniper Exp $ */ +/* $Id: memory.c,v 1.8.2.1 2005/10/06 21:31:25 helly Exp $ */ #define _GNU_SOURCE #include php.h @@ -313,7 +313,13 @@ ts = stream-abstract; assert(ts != NULL); - return php_stream_read(ts-innerstream, buf, count); + size_t got = php_stream_read(ts-innerstream, buf, count); + + if (!got) { + stream-eof |= ts-innerstream-eof; + } + + return got; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /main memory_streams.c
helly Thu Oct 6 17:35:30 2005 EDT Modified files: (Branch: PHP_4_4) /php-src/main memory_streams.c Log: - MFH Fix issue (endless loop) with temp/memory streams http://cvs.php.net/diff.php/php-src/main/memory_streams.c?r1=1.20.2.2r2=1.20.2.2.8.1ty=u Index: php-src/main/memory_streams.c diff -u php-src/main/memory_streams.c:1.20.2.2 php-src/main/memory_streams.c:1.20.2.2.8.1 --- php-src/main/memory_streams.c:1.20.2.2 Tue Dec 31 11:26:11 2002 +++ php-src/main/memory_streams.c Thu Oct 6 17:35:29 2005 @@ -12,11 +12,12 @@ | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Author: | - | Marcus Boerger [EMAIL PROTECTED] | + | Author: Marcus Boerger [EMAIL PROTECTED] | +--+ */ +/* $Id: memory_streams.c,v 1.20.2.2.8.1 2005/10/06 21:35:29 helly Exp $ */ + #define _GNU_SOURCE #include php.h @@ -214,7 +215,6 @@ php_stream *stream; self = emalloc(sizeof(*self)); - assert(self != NULL); self-data = NULL; self-fpos = 0; self-fsize = 0; @@ -313,7 +313,13 @@ ts = stream-abstract; assert(ts != NULL); - return php_stream_read(ts-innerstream, buf, count); + size_t got = php_stream_read(ts-innerstream, buf, count); + + if (!got) { + stream-eof |= ts-innerstream-eof; + } + + return got; } /* }}} */ @@ -423,15 +429,15 @@ NULL /* set_option */ }; +/* }}} */ -/* {{{ */ +/* {{{ _php_stream_temp_create */ PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC) { php_stream_temp_data *self; php_stream *stream; self = ecalloc(1, sizeof(*self)); - assert(self != NULL); self-smax = max_memory_usage; self-mode = mode; stream = php_stream_alloc(php_stream_temp_ops, self, 0, r+b); @@ -443,7 +449,7 @@ /* }}} */ -/* {{{ */ +/* {{{ _php_stream_temp_open */ PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC) { php_stream *stream; @@ -462,6 +468,7 @@ } /* }}} */ + /* * Local variables: * tab-width: 4 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard php_string.h
fmk Thu Oct 6 17:40:30 2005 EDT Modified files: /php-src/ext/standard php_string.h Log: Fix Win32 build by adding missing function declaration. http://cvs.php.net/diff.php/php-src/ext/standard/php_string.h?r1=1.90r2=1.91ty=u Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.90 php-src/ext/standard/php_string.h:1.91 --- php-src/ext/standard/php_string.h:1.90 Wed Sep 28 05:22:08 2005 +++ php-src/ext/standard/php_string.h Thu Oct 6 17:40:30 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.90 2005/09/28 09:22:08 rolland Exp $ */ +/* $Id: php_string.h,v 1.91 2005/10/06 21:40:30 fmk Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -136,6 +136,7 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zend_uchar str_type, zval *return_value, int mode TSRMLS_DC); +PHPAPI int32_t php_u_strip_tags(UChar *rbuf, int32_t len, int *stateptr, UChar *allow, int32_t allow_len TSRMLS_DC); PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, pval *result, int case_sensitivity, int *replace_count); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c
gschlossnagle Thu Oct 6 18:30:11 2005 EDT Modified files: /php-src/ext/soap php_encoding.c Log: support complex types in restrictions and extensions http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.107r2=1.108ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.107 php-src/ext/soap/php_encoding.c:1.108 --- php-src/ext/soap/php_encoding.c:1.107 Thu Sep 29 06:00:59 2005 +++ php-src/ext/soap/php_encoding.c Thu Oct 6 18:30:08 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.107 2005/09/29 10:00:59 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.108 2005/10/06 22:30:08 gschlossnagle Exp $ */ #include time.h @@ -319,6 +319,10 @@ node = encode-to_xml_after(encode-details, node, style); } } + if(!node) { + node = xmlNewNode(NULL,BOGUS); + xmlAddChild(parent, node); + } return node; } @@ -1536,6 +1540,7 @@ enc = sdlType-encode; while (enc enc-details.sdl_type + enc-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX enc-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE enc-details.sdl_type-kind != XSD_TYPEKIND_LIST enc-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1545,11 +1550,8 @@ zval *tmp = get_zval_property(data, _ TSRMLS_CC); if (tmp) { xmlParam = master_to_xml(enc, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(enc, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,BOGUS); - xmlAddChild(parent, xmlParam); + xmlParam = master_to_xml(enc, data, style, parent); } } else { xmlParam = xmlNewNode(NULL,BOGUS); @@ -1558,6 +1560,7 @@ } else if (sdlType-kind == XSD_TYPEKIND_EXTENSION sdlType-encode type != sdlType-encode-details) { if (sdlType-encode-details.sdl_type + sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_LIST sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1567,12 +1570,9 @@ if (tmp) { xmlParam = master_to_xml(sdlType-encode, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(sdlType-encode, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,BOGUS); - xmlAddChild(parent, xmlParam); - } + xmlParam = master_to_xml(sdlType-encode, data, style, parent); + } } } else { xmlParam = xmlNewNode(NULL,BOGUS); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/soap php_encoding.c
gschlossnagle Thu Oct 6 18:30:24 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/soap php_encoding.c Log: MFH: support complex types in restrictions and extensions http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.103.2.3r2=1.103.2.4ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.3 php-src/ext/soap/php_encoding.c:1.103.2.4 --- php-src/ext/soap/php_encoding.c:1.103.2.3 Thu Sep 29 06:02:11 2005 +++ php-src/ext/soap/php_encoding.c Thu Oct 6 18:30:24 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.103.2.3 2005/09/29 10:02:11 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.4 2005/10/06 22:30:24 gschlossnagle Exp $ */ #include time.h @@ -319,6 +319,10 @@ node = encode-to_xml_after(encode-details, node, style); } } + if(!node) { + node = xmlNewNode(NULL,BOGUS); + xmlAddChild(parent, node); + } return node; } @@ -1512,7 +1516,6 @@ int i; sdlTypePtr sdlType = type-sdl_type; TSRMLS_FETCH(); - if (!data || Z_TYPE_P(data) == IS_NULL) { xmlParam = xmlNewNode(NULL,BOGUS); xmlAddChild(parent, xmlParam); @@ -1535,6 +1538,7 @@ enc = sdlType-encode; while (enc enc-details.sdl_type + enc-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX enc-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE enc-details.sdl_type-kind != XSD_TYPEKIND_LIST enc-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1544,12 +1548,9 @@ zval *tmp = get_zval_property(data, _ TSRMLS_CC); if (tmp) { xmlParam = master_to_xml(enc, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(enc, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,BOGUS); - xmlAddChild(parent, xmlParam); - } + xmlParam = master_to_xml(enc, data, style, parent); + } } else { xmlParam = xmlNewNode(NULL,BOGUS); xmlAddChild(parent, xmlParam); @@ -1557,6 +1558,7 @@ } else if (sdlType-kind == XSD_TYPEKIND_EXTENSION sdlType-encode type != sdlType-encode-details) { if (sdlType-encode-details.sdl_type + sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_LIST sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1566,11 +1568,8 @@ if (tmp) { xmlParam = master_to_xml(sdlType-encode, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(sdlType-encode, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,BOGUS); - xmlAddChild(parent, xmlParam); + xmlParam = master_to_xml(sdlType-encode, data, style, parent); } } } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c
gschlossnagle Fri Oct 7 01:14:31 2005 EDT Modified files: /php-src/ext/soap php_encoding.c Log: Permit correct usage of inherited encoders (from restriction/extension base directives) for xml response decoding. http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.108r2=1.109ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.108 php-src/ext/soap/php_encoding.c:1.109 --- php-src/ext/soap/php_encoding.c:1.108 Thu Oct 6 18:30:08 2005 +++ php-src/ext/soap/php_encoding.c Fri Oct 7 01:14:31 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.108 2005/10/06 22:30:08 gschlossnagle Exp $ */ +/* $Id: php_encoding.c,v 1.109 2005/10/07 05:14:31 gschlossnagle Exp $ */ #include time.h @@ -1189,6 +1189,7 @@ enc = sdlType-encode; while (enc enc-details.sdl_type + enc-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX enc-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE enc-details.sdl_type-kind != XSD_TYPEKIND_LIST enc-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1211,6 +1212,7 @@ sdlType-encode type != sdlType-encode-details) { if (sdlType-encode-details.sdl_type + sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_LIST sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_UNION) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/soap php_encoding.c
gschlossnagle Fri Oct 7 01:14:52 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/soap php_encoding.c Log: Permit correct usage of inherited encoders (from restriction/extension base directives) for xml response decoding. http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.103.2.4r2=1.103.2.5ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.4 php-src/ext/soap/php_encoding.c:1.103.2.5 --- php-src/ext/soap/php_encoding.c:1.103.2.4 Thu Oct 6 18:30:24 2005 +++ php-src/ext/soap/php_encoding.c Fri Oct 7 01:14:52 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.103.2.4 2005/10/06 22:30:24 gschlossnagle Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.5 2005/10/07 05:14:52 gschlossnagle Exp $ */ #include time.h @@ -1185,9 +1185,9 @@ if (sdlType-kind == XSD_TYPEKIND_RESTRICTION sdlType-encode type != sdlType-encode-details) { encodePtr enc; - enc = sdlType-encode; while (enc enc-details.sdl_type + enc-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX enc-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE enc-details.sdl_type-kind != XSD_TYPEKIND_LIST enc-details.sdl_type-kind != XSD_TYPEKIND_UNION) { @@ -1210,6 +1210,7 @@ sdlType-encode type != sdlType-encode-details) { if (sdlType-encode-details.sdl_type + sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_COMPLEX sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_SIMPLE sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_LIST sdlType-encode-details.sdl_type-kind != XSD_TYPEKIND_UNION) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php