Re: [PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
?? When was this added? If anything change it to something like PHP_INT_MAX or MATH_INT_MAX Please revert this from HEAD and PHP_4_3 or fix it. Thanks. At 07:27 AM 4/22/2005 +, Andrey Hristov wrote: andrey Fri Apr 22 03:27:46 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH introduce INT_MAX and INT_SIZE #would be wonderful if the doc team takes care of that #defined since 4.3.12, missing in 5.0.0-5.0.4, available in 5.0.5+ http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.60r2=1.512.2.61ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.60 php-src/main/main.c:1.512.2.61 --- php-src/main/main.c:1.512.2.60 Tue Mar 8 16:45:51 2005 +++ php-src/main/main.c Fri Apr 22 03:27:45 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.60 2005/03/08 21:45:51 sniper Exp $ */ +/* $Id: main.c,v 1.512.2.61 2005/04/22 07:27:45 andrey Exp $ */ /* {{{ includes */ @@ -1206,6 +1206,8 @@ REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(INT_MAX, LONG_MAX, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(INT_SIZE, sizeof(long), CONST_PERSISTENT | CONST_CS); php_output_register_constants(TSRMLS_C); php_rfc1867_register_constants(TSRMLS_C); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
andrey Wed Apr 27 17:22:18 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: change names http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.61r2=1.512.2.62ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.61 php-src/main/main.c:1.512.2.62 --- php-src/main/main.c:1.512.2.61 Fri Apr 22 03:27:45 2005 +++ php-src/main/main.c Wed Apr 27 17:22:18 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.61 2005/04/22 07:27:45 andrey Exp $ */ +/* $Id: main.c,v 1.512.2.62 2005/04/27 21:22:18 andrey Exp $ */ /* {{{ includes */ @@ -1206,8 +1206,8 @@ REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); - REGISTER_MAIN_LONG_CONSTANT(INT_MAX, LONG_MAX, CONST_PERSISTENT | CONST_CS); - REGISTER_MAIN_LONG_CONSTANT(INT_SIZE, sizeof(long), CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), CONST_PERSISTENT | CONST_CS); php_output_register_constants(TSRMLS_C); php_rfc1867_register_constants(TSRMLS_C); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
andrey Fri Apr 22 03:27:46 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH introduce INT_MAX and INT_SIZE #would be wonderful if the doc team takes care of that #defined since 4.3.12, missing in 5.0.0-5.0.4, available in 5.0.5+ http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.60r2=1.512.2.61ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.60 php-src/main/main.c:1.512.2.61 --- php-src/main/main.c:1.512.2.60 Tue Mar 8 16:45:51 2005 +++ php-src/main/main.c Fri Apr 22 03:27:45 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.60 2005/03/08 21:45:51 sniper Exp $ */ +/* $Id: main.c,v 1.512.2.61 2005/04/22 07:27:45 andrey Exp $ */ /* {{{ includes */ @@ -1206,6 +1206,8 @@ REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(INT_MAX, LONG_MAX, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_LONG_CONSTANT(INT_SIZE, sizeof(long), CONST_PERSISTENT | CONST_CS); php_output_register_constants(TSRMLS_C); php_rfc1867_register_constants(TSRMLS_C); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c php.h
sniper Tue Mar 8 16:45:51 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main php.h main.c Log: MFH http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.178.2.12r2=1.178.2.13ty=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.178.2.12 php-src/main/php.h:1.178.2.13 --- php-src/main/php.h:1.178.2.12 Tue Mar 8 16:22:20 2005 +++ php-src/main/php.h Tue Mar 8 16:45:51 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.178.2.12 2005/03/08 21:22:20 sniper Exp $ */ +/* $Id: php.h,v 1.178.2.13 2005/03/08 21:45:51 sniper Exp $ */ #ifndef PHP_H #define PHP_H @@ -299,13 +299,15 @@ #endif /* PHPAPI void php_error(int type, const char *format, ...); */ -PHPAPI void php_error_docref(const char *docref TSRMLS_DC, int type, const char *format, ...) +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); +#define php_error_docref php_error_docref0 + #define zenderror phperror #define zendlex phplex http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.59r2=1.512.2.60ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.59 php-src/main/main.c:1.512.2.60 --- php-src/main/main.c:1.512.2.59 Wed Feb 16 23:46:52 2005 +++ php-src/main/main.c Tue Mar 8 16:45:51 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.59 2005/02/17 04:46:52 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.60 2005/03/08 21:45:51 sniper Exp $ */ /* {{{ includes */ @@ -541,9 +541,9 @@ } /* }}} */ -/* {{{ php_error_docref */ +/* {{{ php_error_docref0 */ /* See: CODING_STANDARDS for details. */ -PHPAPI void php_error_docref(const char *docref TSRMLS_DC, int type, const char *format, ...) +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) { va_list args; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
sniper Sun Jan 9 11:12:23 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: - Fix memleak in ZTS mode http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.56r2=1.512.2.57ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.56 php-src/main/main.c:1.512.2.57 --- php-src/main/main.c:1.512.2.56 Fri Oct 1 10:27:13 2004 +++ php-src/main/main.c Sun Jan 9 11:12:23 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.56 2004/10/01 14:27:13 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.57 2005/01/09 16:12:23 sniper Exp $ */ /* {{{ includes */ @@ -1297,6 +1297,8 @@ #ifndef ZTS zend_ini_shutdown(TSRMLS_C); shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC); +#else + zend_ini_global_shutdown(TSRMLS_C); #endif module_initialized = 0; @@ -1777,8 +1779,7 @@ { int ret = -1; - if (auth auth[0] != '\0' -strncmp(auth, Basic , 6) == 0) { + if (auth auth[0] != '\0' strncmp(auth, Basic , 6) == 0) { char *pass; char *user; @@ -1796,8 +1797,9 @@ } } - if (ret == -1) + if (ret == -1) { SG(request_info).auth_user = SG(request_info).auth_password = NULL; + } return ret; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
iliaa Fri Oct 1 10:27:13 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: Make PHP_EOL constant available. http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.55r2=1.512.2.56ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.55 php-src/main/main.c:1.512.2.56 --- php-src/main/main.c:1.512.2.55 Mon Aug 16 08:23:06 2004 +++ php-src/main/main.c Fri Oct 1 10:27:13 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.55 2004/08/16 12:23:06 zeev Exp $ */ +/* $Id: main.c,v 1.512.2.56 2004/10/01 14:27:13 iliaa Exp $ */ /* {{{ includes */ @@ -1204,6 +1204,7 @@ REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_PATH, PHP_CONFIG_FILE_PATH, sizeof(PHP_CONFIG_FILE_PATH)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); php_output_register_constants(TSRMLS_C); php_rfc1867_register_constants(TSRMLS_C); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
zeevMon Aug 16 08:23:06 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: Fix an OLDIE fd leak http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.54r2=1.512.2.55ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.54 php-src/main/main.c:1.512.2.55 --- php-src/main/main.c:1.512.2.54 Wed Jul 21 12:25:28 2004 +++ php-src/main/main.c Mon Aug 16 08:23:06 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.54 2004/07/21 16:25:28 sesser Exp $ */ +/* $Id: main.c,v 1.512.2.55 2004/08/16 12:23:06 zeev Exp $ */ /* {{{ includes */ @@ -1668,6 +1668,7 @@ EG(exit_status) = 0; if (php_handle_special_queries(TSRMLS_C)) { + zend_file_handle_dtor(primary_file); return 0; } #ifndef HAVE_BROKEN_GETCWD -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
iliaa Sun Feb 8 23:05:57 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: Fixed bug #27175 (tzset() is not being called by PHP on startup). http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.512.2.52r2=1.512.2.53ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.52 php-src/main/main.c:1.512.2.53 --- php-src/main/main.c:1.512.2.52 Wed Jan 28 19:09:26 2004 +++ php-src/main/main.c Sun Feb 8 23:05:56 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.52 2004/01/29 00:09:26 pollita Exp $ */ +/* $Id: main.c,v 1.512.2.53 2004/02/09 04:05:56 iliaa Exp $ */ /* {{{ includes */ @@ -1138,6 +1138,10 @@ setlocale(LC_CTYPE, ); #endif +#if HAVE_TZSET + tzset(); +#endif + #if defined(PHP_WIN32) || (defined(NETWARE) defined(USE_WINSOCK)) /* start up winsock services */ if (WSAStartup(wVersionRequested, wsaData) != 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
iliaa Wed Dec 24 11:43:25 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: Fixed bug #26707 (Incorrect error for disabled functions/classes). # Direct MFH of the patch in PHP 5.0 cannot be used because that would # require the change of API. So we'll need to make do with a one time # (small) memory leak on startup when disable_functions and/or classes are # used. Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.50 php-src/main/main.c:1.512.2.51 --- php-src/main/main.c:1.512.2.50 Wed Oct 8 22:59:03 2003 +++ php-src/main/main.c Wed Dec 24 11:43:23 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.50 2003/10/09 02:59:03 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.51 2003/12/24 16:43:23 iliaa Exp $ */ /* {{{ includes */ @@ -165,23 +165,22 @@ */ static void php_disable_functions(TSRMLS_D) { - char *s = NULL; - char *e = INI_STR(disable_functions); - char p; + char *s = NULL, *e; - if (!*e) { + if (!*(INI_STR(disable_functions))) { return; } + /* Intentional one time memory leak on startup */ + e = strdup(INI_STR(disable_functions)); + while (*e) { switch (*e) { case ' ': case ',': if (s) { - p = *e; *e = '\0'; zend_disable_function(s, e-s TSRMLS_CC); - *e = p; s = NULL; } break; @@ -203,23 +202,22 @@ */ static void php_disable_classes(TSRMLS_D) { - char *s = NULL; - char *e = INI_STR(disable_classes); - char p; + char *s = NULL, *e; - if (!*e) { + if (!*(INI_STR(disable_classes))) { return; } + /* Intentional one time memory leak on startup */ + e = strdup(INI_STR(disable_classes)); + while (*e) { switch (*e) { case ' ': case ',': if (s) { - p = *e; *e = '\0'; zend_disable_class(s, e-s TSRMLS_CC); - *e = p; s = NULL; } break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
andrei Wed Oct 1 17:24:20 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: @- Made $argc and $argv always available as globals in CLI. No more @ silliness. (Andrei) Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.47 php-src/main/main.c:1.512.2.48 --- php-src/main/main.c:1.512.2.47 Wed Sep 24 19:22:32 2003 +++ php-src/main/main.c Wed Oct 1 17:24:19 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.47 2003/09/24 23:22:32 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.48 2003/10/01 21:24:19 andrei Exp $ */ /* {{{ includes */ @@ -1316,11 +1316,6 @@ sapi_module.register_server_variables(array_ptr TSRMLS_CC); } - /* argv/argc support */ - if (PG(register_argc_argv)) { - php_build_argv(SG(request_info).query_string TSRMLS_CC); - } - /* PHP Authentication support */ if (SG(request_info).auth_user) { php_register_variable(PHP_AUTH_USER, SG(request_info).auth_user, array_ptr TSRMLS_CC); @@ -1482,6 +1477,11 @@ } } + /* argv/argc support */ + if (PG(register_argc_argv)) { + php_build_argv(SG(request_info).query_string TSRMLS_CC); + } + for (i=0; iNUM_TRACK_VARS; i++) { if (!PG(http_globals)[i]) { if (!initialized_dummy_track_vars_array) { @@ -1549,10 +1549,15 @@ pval *arr, *argc, *tmp; int count = 0; char *ss, *space; + + if (! (PG(register_globals) || SG(request_info).argc || + PG(http_globals)[TRACK_VARS_SERVER]) ) { + return; + } ALLOC_ZVAL(arr); array_init(arr); - INIT_PZVAL(arr); + arr-is_ref = 0; /* Prepare argv */ if (SG(request_info).argc) { /* are we in cli sapi? */ @@ -1605,7 +1610,7 @@ Z_LVAL_P(argc) = count; } Z_TYPE_P(argc) = IS_LONG; - INIT_PZVAL(argc); + argc-is_ref = 0; if (PG(register_globals) || SG(request_info).argc) { arr-refcount++; @@ -1614,7 +1619,9 @@ zend_hash_add(EG(symbol_table), argc, sizeof(argc), argc, sizeof(zval *), NULL); } - if ( PG(http_globals)[TRACK_VARS_SERVER] != NULL ) { + if (PG(http_globals)[TRACK_VARS_SERVER] != NULL) { + arr-refcount++; + argc-refcount++; zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), argv, sizeof(argv), arr, sizeof(pval *), NULL); zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), argc, sizeof(argc), argc, sizeof(pval *), NULL); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
andrei Wed Oct 1 19:13:05 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: Make sure to clear out the refcount. Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.48 php-src/main/main.c:1.512.2.49 --- php-src/main/main.c:1.512.2.48 Wed Oct 1 17:24:19 2003 +++ php-src/main/main.c Wed Oct 1 19:13:04 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.48 2003/10/01 21:24:19 andrei Exp $ */ +/* $Id: main.c,v 1.512.2.49 2003/10/01 23:13:04 andrei Exp $ */ /* {{{ includes */ @@ -1558,6 +1558,7 @@ ALLOC_ZVAL(arr); array_init(arr); arr-is_ref = 0; + arr-refcount = 0; /* Prepare argv */ if (SG(request_info).argc) { /* are we in cli sapi? */ @@ -1611,6 +1612,7 @@ } Z_TYPE_P(argc) = IS_LONG; argc-is_ref = 0; + argc-refcount = 0; if (PG(register_globals) || SG(request_info).argc) { arr-refcount++; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
iliaa Fri Aug 22 16:02:12 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: Fixed bug #25127 (reset memory_limit before terminating the request) Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.45 php-src/main/main.c:1.512.2.46 --- php-src/main/main.c:1.512.2.45 Sat Aug 9 19:15:19 2003 +++ php-src/main/main.c Fri Aug 22 16:02:11 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.45 2003/08/09 23:15:19 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.46 2003/08/22 20:02:11 iliaa Exp $ */ /* {{{ includes */ @@ -150,14 +150,12 @@ */ static PHP_INI_MH(OnChangeMemoryLimit) { - int new_limit; - if (new_value) { - new_limit = zend_atoi(new_value, new_value_length); + PG(memory_limit) = zend_atoi(new_value, new_value_length); } else { - new_limit = 130; /* effectively, no limit */ + PG(memory_limit) = 130; /* effectively, no limit */ } - return zend_set_memory_limit(new_limit); + return zend_set_memory_limit(PG(memory_limit)); } /* }}} */ #endif @@ -702,6 +700,10 @@ case E_USER_ERROR: EG(exit_status) = 255; if (module_initialized) { +#if MEMORY_LIMIT + /* restore memory limit */ + AG(memory_limit) = PG(memory_limit); +#endif zend_bailout(); efree(buffer); return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
iliaa Sat Aug 9 19:15:21 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: MFH: timeout fix Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.44 php-src/main/main.c:1.512.2.45 --- php-src/main/main.c:1.512.2.44 Thu Jul 31 19:00:21 2003 +++ php-src/main/main.c Sat Aug 9 19:15:19 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.44 2003/07/31 23:00:21 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.45 2003/08/09 23:15:19 iliaa Exp $ */ /* {{{ includes */ @@ -865,6 +865,7 @@ void php_on_timeout(int seconds TSRMLS_DC) { PG(connection_status) |= PHP_CONNECTION_TIMEOUT; + zend_set_timeout(EG(timeout_seconds)); } #if PHP_SIGCHILD -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main main.c
zeevTue Jul 22 11:46:48 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main main.c Log: Fix potential crash (zend_hash_get_current_key_ex() doesn't touch the string arguments if the key is not a string!) Index: php-src/main/main.c diff -u php-src/main/main.c:1.512.2.42 php-src/main/main.c:1.512.2.43 --- php-src/main/main.c:1.512.2.42 Fri Jun 20 13:00:16 2003 +++ php-src/main/main.c Tue Jul 22 11:46:48 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.42 2003/06/20 17:00:16 iliaa Exp $ */ +/* $Id: main.c,v 1.512.2.43 2003/07/22 15:46:48 zeev Exp $ */ /* {{{ includes */ @@ -1337,9 +1337,9 @@ zend_hash_internal_pointer_reset_ex(src, pos); while (zend_hash_get_current_data_ex(src, (void **)src_entry, pos) == SUCCESS) { key_type = zend_hash_get_current_key_ex(src, string_key, string_key_len, num_key, 0, pos); - if (Z_TYPE_PP(src_entry) != IS_ARRAY || - (string_key_len zend_hash_find(dest, string_key, string_key_len, (void **)dest_entry) != SUCCESS) || - (!string_key_len zend_hash_index_find(dest, num_key, (void **)dest_entry) != SUCCESS) + if (Z_TYPE_PP(src_entry) != IS_ARRAY + || (key_type==HASH_KEY_IS_STRING zend_hash_find(dest, string_key, string_key_len, (void **)dest_entry) != SUCCESS) + || (key_type==HASH_KEY_IS_LONG zend_hash_index_find(dest, num_key, (void **)dest_entry) != SUCCESS) || Z_TYPE_PP(dest_entry) != IS_ARRAY) { (*src_entry)-refcount++; if (key_type == HASH_KEY_IS_STRING) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php