[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
felipe Wed Apr 8 00:16:50 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: - MFH: Fix ZTS build http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.31&r2=1.129.2.13.2.32&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.31 php-src/sapi/cli/php_cli.c:1.129.2.13.2.32 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.31 Tue Apr 7 16:11:57 2009 +++ php-src/sapi/cli/php_cli.c Wed Apr 8 00:16:50 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.31 2009/04/07 16:11:57 lbarnaud Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.32 2009/04/08 00:16:50 felipe Exp $ */ #include "php.h" #include "php_globals.h" @@ -230,7 +230,7 @@ #define STDOUT_FILENO 1 #endif -static inline int sapi_cli_select(int fd) +static inline int sapi_cli_select(int fd TSRMLS_DC) { fd_set wfd, dfd; struct timeval tv; @@ -249,14 +249,14 @@ return ret != -1; } -static inline size_t sapi_cli_single_write(const char *str, uint str_length) /* {{{ */ +static inline size_t sapi_cli_single_write(const char *str, uint str_length TSRMLS_DC) /* {{{ */ { #ifdef PHP_WRITE_STDOUT long ret; do { ret = write(STDOUT_FILENO, str, str_length); - } while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO)); + } while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO TSRMLS_CC)); if (ret <= 0) { return 0; @@ -287,7 +287,7 @@ while (remaining > 0) { - ret = sapi_cli_single_write(ptr, remaining); + ret = sapi_cli_single_write(ptr, remaining TSRMLS_CC); if (!ret) { #ifndef PHP_CLI_WIN32_NO_CONSOLE php_handle_aborted_connection(); @@ -1143,7 +1143,7 @@ pos = 0; if (php_last_char != '\0' && php_last_char != '\n') { - sapi_cli_single_write("\n", 1); + sapi_cli_single_write("\n", 1 TSRMLS_CC); } if (EG(exception)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
lbarnaudTue Nov 25 03:53:00 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: MFH: Fixed endless loop in cli when ignore_user_abort is on http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.28&r2=1.129.2.13.2.29&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.28 php-src/sapi/cli/php_cli.c:1.129.2.13.2.29 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.28 Mon Nov 3 23:26:24 2008 +++ php-src/sapi/cli/php_cli.c Tue Nov 25 03:53:00 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.28 2008/11/03 23:26:24 lbarnaud Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.29 2008/11/25 03:53:00 lbarnaud Exp $ */ #include "php.h" #include "php_globals.h" @@ -260,11 +260,10 @@ { ret = sapi_cli_single_write(ptr, remaining); if (!ret) { -#ifdef PHP_CLI_WIN32_NO_CONSOLE - break; -#else +#ifndef PHP_CLI_WIN32_NO_CONSOLE php_handle_aborted_connection(); #endif + break; } ptr += ret; remaining -= ret; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
dmitry Tue Jan 29 20:01:14 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: Fixed bug #43968 (Extending internal class causes a crash) The fix is a workaround for GCC optizer bug. http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.23&r2=1.129.2.13.2.24&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.23 php-src/sapi/cli/php_cli.c:1.129.2.13.2.24 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.23 Mon Dec 31 07:20:16 2007 +++ php-src/sapi/cli/php_cli.c Tue Jan 29 20:01:14 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.23 2007/12/31 07:20:16 sebastian Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.24 2008/01/29 20:01:14 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -588,7 +588,7 @@ int main(int argc, char *argv[]) #endif { - int exit_status = SUCCESS; + volatile int exit_status = SUCCESS; int c; zend_file_handle file_handle; /* temporary locals */ @@ -599,8 +599,8 @@ char *arg_free=NULL, **arg_excp=&arg_free; char *script_file=NULL; int interactive=0; - int module_started = 0; - int request_started = 0; + volatile int module_started = 0; + volatile int request_started = 0; int lineno = 0; char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL; const char *param_error=NULL; @@ -1229,8 +1229,9 @@ if (exec_end && zend_eval_string_ex(exec_end, NULL, "Command line end code", 1 TSRMLS_CC) == FAILURE) { exit_status=254; } - + break; + } #ifdef HAVE_REFLECTION case PHP_MODE_REFLECTION_FUNCTION: case PHP_MODE_REFLECTION_CLASS: @@ -1311,7 +1312,6 @@ zend_printf("Additional .ini files parsed: %s\n", php_ini_scanned_files ? php_ini_scanned_files : "(none)"); break; } - } } } zend_end_try(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
stasWed Aug 8 23:51:24 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.21&r2=1.129.2.13.2.22&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.21 php-src/sapi/cli/php_cli.c:1.129.2.13.2.22 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.21 Mon Jun 4 09:47:54 2007 +++ php-src/sapi/cli/php_cli.c Wed Aug 8 23:51:24 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.21 2007/06/04 09:47:54 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.22 2007/08/08 23:51:24 stas Exp $ */ #include "php.h" #include "php_globals.h" @@ -607,10 +607,6 @@ int hide_argv = 0; /* end of temporary locals */ #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif #ifdef PHP_CLI_WIN32_NO_CONSOLE @@ -648,6 +644,7 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); #endif cli_sapi_module.ini_defaults = sapi_cli_ini_defaults; @@ -716,14 +713,6 @@ cli_sapi_module.executable_location = argv[0]; -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); -#endif - /* startup after we get the above ini override se we get things right */ if (cli_sapi_module.startup(&cli_sapi_module)==FAILURE) { /* there is no way to see if we must call zend_ini_deactivate() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
johannesSun May 6 12:57:50 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: - MFH: Fix build without reflection http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.19&r2=1.129.2.13.2.20&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.19 php-src/sapi/cli/php_cli.c:1.129.2.13.2.20 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.19 Sat May 5 16:21:07 2007 +++ php-src/sapi/cli/php_cli.c Sun May 6 12:57:50 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.19 2007/05/05 16:21:07 helly Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.20 2007/05/06 12:57:50 johannes Exp $ */ #include "php.h" #include "php_globals.h" @@ -580,9 +580,7 @@ zend_file_handle file_handle; /* temporary locals */ int behavior=PHP_MODE_STANDARD; -#ifdef HAVE_REFLECTION char *reflection_what = NULL; -#endif int orig_optind=php_optind; char *orig_optarg=php_optarg; char *arg_free=NULL, **arg_excp=&arg_free; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
helly Sat May 5 16:21:07 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: - MFH --ri does not require ext/Reflection - MFH --ini to show ini files being used http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.18&r2=1.129.2.13.2.19&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.18 php-src/sapi/cli/php_cli.c:1.129.2.13.2.19 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.18 Wed Apr 25 09:56:29 2007 +++ php-src/sapi/cli/php_cli.c Sat May 5 16:21:07 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.18 2007/04/25 09:56:29 bjori Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.19 2007/05/05 16:21:07 helly Exp $ */ #include "php.h" #include "php_globals.h" @@ -91,6 +91,9 @@ #include "php_getopt.h" +PHPAPI extern char *php_ini_opened_path; +PHPAPI extern char *php_ini_scanned_files; + #ifndef O_BINARY #define O_BINARY 0 #endif @@ -106,6 +109,7 @@ #define PHP_MODE_REFLECTION_CLASS 9 #define PHP_MODE_REFLECTION_EXTENSION 10 #define PHP_MODE_REFLECTION_EXT_INFO11 +#define PHP_MODE_SHOW_INI_CONFIG12 #define HARDCODED_INI \ "html_errors=0\n" \ @@ -153,16 +157,17 @@ {11, 1, "rclass"}, {12, 1, "re"}, {12, 1, "rextension"}, +#endif {13, 1, "ri"}, {13, 1, "rextinfo"}, -#endif + {14, 0, "ini"}, {'-', 0, NULL} /* end of args */ }; -static int print_module_info(zend_module_entry *module, void *arg TSRMLS_DC) +static int print_module_info(zend_module_entry *module TSRMLS_DC) { php_printf("%s\n", module->name); - return 0; + return ZEND_HASH_APPLY_KEEP; } static int module_name_cmp(const void *a, const void *b TSRMLS_DC) @@ -182,14 +187,14 @@ zend_hash_init(&sorted_registry, 50, NULL, NULL, 1); zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry)); zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC); - zend_hash_apply_with_argument(&sorted_registry, (apply_func_arg_t) print_module_info, NULL TSRMLS_CC); + zend_hash_apply(&sorted_registry, (apply_func_t) print_module_info TSRMLS_CC); zend_hash_destroy(&sorted_registry); } static int print_extension_info(zend_extension *ext, void *arg TSRMLS_DC) { php_printf("%s\n", ext->name); - return 0; + return ZEND_HASH_APPLY_KEEP; } static int extension_name_cmp(const zend_llist_element **f, @@ -206,7 +211,7 @@ zend_llist_copy(&sorted_exts, &zend_extensions); sorted_exts.dtor = NULL; zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC); - zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC); + zend_llist_apply(&sorted_exts, (llist_apply_func_t) print_extension_info TSRMLS_CC); zend_llist_destroy(&sorted_exts); } @@ -448,13 +453,15 @@ " args... Arguments passed to script. Use -- args when first argument\n" " starts with - or script is read from stdin\n" "\n" + " --iniShow configuration file names\n" + "\n" #if (HAVE_REFLECTION) " --rf Show information about function .\n" " --rc Show information about class .\n" " --re Show information about extension .\n" +#endif " --ri Show configuration for extension .\n" "\n" -#endif , prog, prog, prog, prog, prog, prog); } /* }}} */ @@ -959,11 +966,14 @@ behavior=PHP_MODE_REFLECTION_EXTENSION; reflection_what = php_optarg; break; +#endif case 13: behavior=PHP_MODE_REFLECTION_EXT_INFO; reflection_what = php_optarg; break; -#endif + case 14: + behavior = PHP_MODE_SHOW_INI_CONFIG; + break; default: break; } @@ -1231,6 +1241,8 @@ zend_execute_data execute_data; switch (behavior) { + default: + break; ca
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
bjori Wed Apr 25 09:56:29 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: MFH: php --ri main http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.17&r2=1.129.2.13.2.18&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.17 php-src/sapi/cli/php_cli.c:1.129.2.13.2.18 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.17 Tue Apr 17 19:46:13 2007 +++ php-src/sapi/cli/php_cli.c Wed Apr 25 09:56:29 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.17 2007/04/17 19:46:13 sniper Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.18 2007/04/25 09:56:29 bjori Exp $ */ #include "php.h" #include "php_globals.h" @@ -1277,8 +1277,12 @@ zend_module_entry *module; if (zend_hash_find(&module_registry, lcname, len+1, (void**)&module) == FAILURE) { - zend_printf("Extension '%s' not present.\n", reflection_what); - exit_status = 1; + if (!strcmp(reflection_what, "main")) { + display_ini_entries(NULL); + } else { + zend_printf("Extension '%s' not present.\n", reflection_what); + exit_status = 1; + } } else { php_info_print_module(module TSRMLS_CC); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
sniper Tue Apr 17 19:46:14 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: - Fix a possible leak when multiple -c parameters are used http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.16&r2=1.129.2.13.2.17&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.16 php-src/sapi/cli/php_cli.c:1.129.2.13.2.17 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.16 Thu Feb 22 10:06:22 2007 +++ php-src/sapi/cli/php_cli.c Tue Apr 17 19:46:13 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.16 2007/02/22 10:06:22 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.17 2007/04/17 19:46:13 sniper Exp $ */ #include "php.h" #include "php_globals.h" @@ -652,7 +652,10 @@ while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { case 'c': - cli_sapi_module.php_ini_path_override = strdup(php_optarg); + if (cli_sapi_module.php_ini_path_override) { + free(cli_sapi_module.php_ini_path_override); + } + cli_sapi_module.php_ini_path_override = strdup(php_optarg); break; case 'n': cli_sapi_module.php_ini_ignore = 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_2) /sapi/cli php_cli.c
tony2001Thu Feb 22 10:06:22 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.15&r2=1.129.2.13.2.16&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.15 php-src/sapi/cli/php_cli.c:1.129.2.13.2.16 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.15 Wed Feb 21 21:57:21 2007 +++ php-src/sapi/cli/php_cli.c Thu Feb 22 10:06:22 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.15 2007/02/21 21:57:21 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.16 2007/02/22 10:06:22 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -476,12 +476,6 @@ s_out = php_stream_open_wrapper_ex("php://stdout", "wb", 0, NULL, sc_out); s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, sc_err); -#if PHP_DEBUG - /* do not close stdout and stderr */ - s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE; - s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE; -#endif - if (s_in==NULL || s_out==NULL || s_err==NULL) { FREE_ZVAL(zin); FREE_ZVAL(zout); @@ -491,7 +485,13 @@ if (s_err) php_stream_close(s_err); return; } - + +#if PHP_DEBUG + /* do not close stdout and stderr */ + s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE; + s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE; +#endif + s_in_process = s_in; php_stream_to_zval(s_in, zin); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
tony2001Thu Dec 21 00:43:16 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.10&r2=1.129.2.13.2.11&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.10 php-src/sapi/cli/php_cli.c:1.129.2.13.2.11 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.10 Fri Sep 22 17:41:09 2006 +++ php-src/sapi/cli/php_cli.c Thu Dec 21 00:43:16 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.10 2006/09/22 17:41:09 iliaa Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.11 2006/12/21 00:43:16 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -474,6 +474,12 @@ s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, sc_err); if (s_in==NULL || s_out==NULL || s_err==NULL) { + FREE_ZVAL(zin); + FREE_ZVAL(zout); + FREE_ZVAL(zerr); + if (s_in) php_stream_close(s_in); + if (s_out) php_stream_close(s_out); + if (s_err) php_stream_close(s_err); return; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
tony2001Fri Sep 15 08:18:37 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: fix leak with `php -c /path -h` http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.7&r2=1.129.2.13.2.8&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.7 php-src/sapi/cli/php_cli.c:1.129.2.13.2.8 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.7 Tue Aug 22 12:04:53 2006 +++ php-src/sapi/cli/php_cli.c Fri Sep 15 08:18:36 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.7 2006/08/22 12:04:53 dmitry Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.8 2006/09/15 08:18:36 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -634,6 +634,7 @@ tsrm_startup(1, 1, 0, NULL); #endif + cli_sapi_module.php_ini_path_override = NULL; cli_sapi_module.ini_defaults = sapi_cli_ini_defaults; cli_sapi_module.phpinfo_as_text = 1; sapi_startup(&cli_sapi_module); @@ -1246,9 +1247,6 @@ } } - if (cli_sapi_module.php_ini_path_override) { - free(cli_sapi_module.php_ini_path_override); - } } zend_end_try(); out: @@ -1259,6 +1257,9 @@ exit_status = EG(exit_status); } out_err: + if (cli_sapi_module.php_ini_path_override) { + free(cli_sapi_module.php_ini_path_override); + } if (module_started) { php_module_shutdown(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_5_2) /sapi/cli php_cli.c
tony2001Tue Jun 20 12:55:26 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: MFH: initialize pointers http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.4&r2=1.129.2.13.2.5&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.4 php-src/sapi/cli/php_cli.c:1.129.2.13.2.5 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.4 Mon Jun 19 14:52:34 2006 +++ php-src/sapi/cli/php_cli.c Tue Jun 20 12:55:26 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.4 2006/06/19 14:52:34 mike Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.5 2006/06/20 12:55:26 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -577,7 +577,7 @@ /* temporary locals */ int behavior=PHP_MODE_STANDARD; #ifdef HAVE_REFLECTION - char *reflection_what; + char *reflection_what = NULL; #endif int orig_optind=php_optind; char *orig_optarg=php_optarg; @@ -1193,7 +1193,7 @@ case PHP_MODE_REFLECTION_CLASS: case PHP_MODE_REFLECTION_EXTENSION: { - zend_class_entry *pce; + zend_class_entry *pce = NULL; zval *arg, *ref; zend_execute_data execute_data; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
helly Tue May 9 23:59:54 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: - Update after api changes http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13&r2=1.129.2.13.2.1&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13 php-src/sapi/cli/php_cli.c:1.129.2.13.2.1 --- php-src/sapi/cli/php_cli.c:1.129.2.13 Tue Feb 21 21:15:13 2006 +++ php-src/sapi/cli/php_cli.c Tue May 9 23:59:54 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13 2006/02/21 21:15:13 johannes Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.1 2006/05/09 23:59:54 helly Exp $ */ #include "php.h" #include "php_globals.h" @@ -1220,7 +1220,7 @@ zend_call_method_with_1_params(&ref, pce, &pce->constructor, "__construct", NULL, arg); if (EG(exception)) { - zval *msg = zend_read_property(zend_exception_get_default(), EG(exception), "message", sizeof("message")-1, 0 TSRMLS_CC); + zval *msg = zend_read_property(zend_exception_get_default(TSRMLS_C), EG(exception), "message", sizeof("message")-1, 0 TSRMLS_CC); zend_printf("Exception: %s\n", Z_STRVAL_P(msg)); zval_ptr_dtor(&EG(exception)); EG(exception) = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php