iliaa           Wed Feb  4 17:49:56 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/sapi/cli   php_cli.c 
  Log:
  MFH: Parse command line ini directives passed using -d before -i, to ensure
  correct settings output.
  
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.51.2.31&r2=1.51.2.32&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.51.2.31 php-src/sapi/cli/php_cli.c:1.51.2.32
--- php-src/sapi/cli/php_cli.c:1.51.2.31        Tue Jan 13 04:13:44 2004
+++ php-src/sapi/cli/php_cli.c  Wed Feb  4 17:49:55 2004
@@ -596,10 +596,21 @@
                        exit_status=1;
                        goto out_err;
                }
-       
+
+               /* here is the place for hard coded defaults which cannot be 
overwritten in the ini file */
+               INI_HARDCODED("register_argc_argv", "1");
+               INI_HARDCODED("html_errors", "0");
+               INI_HARDCODED("implicit_flush", "1");
+               INI_HARDCODED("output_buffering", "0");
+               INI_HARDCODED("max_execution_time", "0");
+
                while ((c = php_getopt(argc, argv, OPTIONS, &optarg, &optind, 0)) != 
-1) {
                        switch (c) {
 
+                       case 'd': /* define ini entries on command line */
+                               define_command_line_ini_entry(optarg);
+                               break;
+
                        case 'h': /* help & quit */
                        case '?':
                                php_output_startup();
@@ -651,12 +662,6 @@
 
         /* Set some CLI defaults */
                SG(options) |= SAPI_OPTION_NO_CHDIR;
-               /* here is the place for hard coded defaults which cannot be 
overwritten in the ini file */
-               INI_HARDCODED("register_argc_argv", "1");
-               INI_HARDCODED("html_errors", "0");
-               INI_HARDCODED("implicit_flush", "1");
-               INI_HARDCODED("output_buffering", "0");
-               INI_HARDCODED("max_execution_time", "0");
 
                optind = orig_optind;
                optarg = orig_optarg;
@@ -671,9 +676,6 @@
                        case 'C': /* don't chdir to the script directory */
                                /* This is default so NOP */
                                break;
-                       case 'd': /* define ini entries on command line */
-                               define_command_line_ini_entry(optarg);
-                               break;
 
                        case 'e': /* enable extended info output */
                                CG(extended_info) = 1;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to