]> granicus.if.org Git - php/commitdiff
- MFH: Fix #34557 php -m exits with "error" 1
authorJohannes Schlüter <johannes@php.net>
Thu, 6 Oct 2005 20:39:26 +0000 (20:39 +0000)
committerJohannes Schlüter <johannes@php.net>
Thu, 6 Oct 2005 20:39:26 +0000 (20:39 +0000)
NEWS
sapi/cgi/cgi_main.c
sapi/cli/php_cli.c

diff --git a/NEWS b/NEWS
index 02f68f98ab5799acab87bcea956536d489fa660c..5466f13ac911391b1a3bc4d4f45bf4c85ab32e3a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ PHP 4                                                                      NEWS
 - 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
index a94a7808d86efc9ae1d3dcca8d9644591d74f87b..393b5601508394109779aad32f9564370b335ac6 100644 (file)
@@ -1395,7 +1395,7 @@ consult the installation file that came with this distribution, or visit \n\
                                                }
                                                php_print_info(0xFFFFFFFF TSRMLS_CC);
                                                php_end_ob_buffers(1 TSRMLS_CC);
-                                               exit(1);
+                                               exit(0);
                                                break;
 
                                case 'l': /* syntax check mode */
@@ -1413,7 +1413,7 @@ consult the installation file that came with this distribution, or visit \n\
                                        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 @@ consult the installation file that came with this distribution, or visit \n\
                                                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': 
index 18758d53300645bc9f891b9eafa389612c1c8a82..bf004a4a338bda1ea3a288e4e3810125dfb7b608 100644 (file)
@@ -623,8 +623,9 @@ int main(int argc, char *argv[])
                                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 @@ int main(int argc, char *argv[])
                                }
                                php_print_info(0xFFFFFFFF 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 @@ int main(int argc, char *argv[])
                                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 @@ int main(int argc, char *argv[])
                                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_status=1;
+                               exit_status=0;
                                goto out;
 
                        default: