summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-02-02 13:51:05 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-02-02 13:51:05 +0000
commit4c6816ddf246418f2f978596c6be5fb1993bdcb8 (patch)
tree842d84ad3ac71dc530d5f8aaca3414ab1d33a793
parentdc02b5a1fd77222ffb3802b03f4db597172f284a (diff)
parenta58c74f1c7f46a0dbdcbe9d1211902a4a8c755cf (diff)
downloadphp-git-4c6816ddf246418f2f978596c6be5fb1993bdcb8.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: remove use of zend directly, avoid leaks/bugs in modules etc
-rw-r--r--sapi/phpdbg/phpdbg.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index e7f841c0bc..7c94ac19dd 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -872,6 +872,7 @@ int main(int argc, char **argv) /* {{{ */
phpdbg_main:
if (!cleaning) {
bp_tmp_file = malloc(L_tmpnam);
+
tmpnam(bp_tmp_file);
if (bp_tmp_file == NULL) {
phpdbg_error("Unable to create temporary file");
@@ -1117,8 +1118,7 @@ phpdbg_main:
phpdbg->ini_entries = ini_entries;
if (phpdbg->startup(phpdbg) == SUCCESS) {
-
- zend_activate(TSRMLS_C);
+ php_request_startup(TSRMLS_C);
/* do not install sigint handlers for remote consoles */
/* sending SIGINT then provides a decent way of shutting down the server */
@@ -1186,20 +1186,11 @@ phpdbg_main:
/* set default prompt */
phpdbg_set_prompt(PROMPT TSRMLS_CC);
- zend_try {
- zend_activate_modules(TSRMLS_C);
- } zend_end_try();
-
if (show_banner) {
/* print blurb */
phpdbg_welcome((cleaning > 0) TSRMLS_CC);
}
- zend_try {
- /* activate globals, they can be overwritten */
- zend_activate_auto_globals(TSRMLS_C);
- } zend_end_try();
-
/* initialize from file */
PHPDBG_G(flags) |= PHPDBG_IS_INITIALIZING;
zend_try {
@@ -1269,12 +1260,6 @@ phpdbg_interact:
} zend_end_try();
} while(!cleaning && !(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
- /* this must be forced */
- CG(unclean_shutdown) = 0;
-
- /* this is just helpful */
- PG(report_memleaks) = 0;
-
phpdbg_out:
#ifndef _WIN32
if ((PHPDBG_G(flags) & PHPDBG_IS_DISCONNECTED)) {
@@ -1297,24 +1282,14 @@ phpdbg_out:
if (ini_override) {
free(ini_override);
}
+
+ /* this must be forced */
+ CG(unclean_shutdown) = 0;
+
+ /* this is just helpful */
+ PG(report_memleaks) = 0;
- if (PG(modules_activated)) {
- zend_try {
- zend_deactivate_modules(TSRMLS_C);
- } zend_end_try();
- }
-
- zend_deactivate(TSRMLS_C);
-
- zend_try {
- zend_post_deactivate_modules(TSRMLS_C);
- } zend_end_try();
-
-#ifdef ZEND_SIGNALS
- zend_try {
- zend_signal_deactivate(TSRMLS_C);
- } zend_end_try();
-#endif
+ php_request_shutdown((void*)0);
zend_try {
php_module_shutdown(TSRMLS_C);