]> granicus.if.org Git - php/commitdiff
* Move unclean_shutdown from PHP to Zend.
authorZeev Suraski <zeev@php.net>
Tue, 11 May 1999 16:52:58 +0000 (16:52 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 11 May 1999 16:52:58 +0000 (16:52 +0000)
* The Master/Local headers in the phpinfo() table were reversed.
* Fix a gpc bug

ext/standard/post.c
ext/standard/string.c
main/main.c
main/php_globals.h
main/php_ini.c

index 8258493213432d3ae137f381b8fda43f3347b485..54ba99b9ea9193819825fc0f0b1e7da8bf1e0a65 100644 (file)
@@ -212,7 +212,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
 
        val_len = strlen(val);
        if (PG(magic_quotes_gpc)) {
-               val = _php3_addslashes(val, val_len, NULL, 0);
+               val = _php3_addslashes(val, val_len, &val_len, 0);
        } else {
                val = estrndup(val, val_len);
        }
index d87b57cf304242ab42e8382c5a69a34a614c31d1..d809349bb64676b74da927770e4901a10e748369 100644 (file)
@@ -1160,7 +1160,9 @@ PHPAPI char *_php3_addslashes(char *str, int length, int *new_length, int should
                }
        }
        *target = 0;
-       if(new_length) *new_length = target - new_str;
+       if (new_length) {
+               *new_length = target - new_str;
+       }
        if (should_free) {
                STR_FREE(str);
        }
index 831d3431f2fa24ac7c63577a15d7de9cf113a61a..2f2d0d65089f51bcbcbb91567865b08ad2876809 100644 (file)
@@ -599,8 +599,6 @@ static void php_message_handler_for_zend(long message, void *data)
 
 int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
 {
-       PG(unclean_shutdown) = 0;
-
        zend_output_startup();
 
 #if APACHE
@@ -675,7 +673,7 @@ void php_request_shutdown(void *dummy)
        sapi_deactivate(SLS_C);
 
        php3_destroy_request_info(NULL);
-       shutdown_memory_manager(PG(unclean_shutdown), 0);
+       shutdown_memory_manager(CG(unclean_shutdown), 0);
        php3_unset_timeout();
 
 
@@ -1151,7 +1149,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
        }
 
        if (setjmp(EG(bailout))!=0) {
-               PG(unclean_shutdown) = 1;
                return;
        }
        _php3_hash_environment(PLS_C ELS_CC);
@@ -1178,8 +1175,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
        if (EG(main_op_array)) {
                EG(active_op_array) = EG(main_op_array);
                zend_execute(EG(main_op_array) ELS_CC);
-       } else {
-               PG(unclean_shutdown) = 1;
        }
 }
 
@@ -1207,7 +1202,7 @@ PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mo
        php3_TreatHeaders();
        file_handle.type = ZEND_HANDLE_FD;
        file_handle.handle.fd = fd;
-       file_handle.filename = request_info.filename;
+       file_handle.filename = SG(request_info).path_translated;
        (void) php_execute_script(&file_handle CLS_CC ELS_CC);
        
        php3_header();                  /* Make sure headers have been sent */
index 0eae5e131c58476b814864a822b3f9c2c5b72748..ea2597e6a6292281d11e725638243186ec7dbab0 100644 (file)
@@ -64,7 +64,6 @@ struct _php_core_globals {
     long y2k_compliance;
 
        unsigned char header_is_being_sent;
-       unsigned char unclean_shutdown;
 };
 
 
index 56f48f1c6699e449c968f23d5a0a55455beeafc3..b96188d525a1742e02e82cf40899cda5126cb64e 100644 (file)
@@ -338,7 +338,7 @@ PHPAPI void display_ini_entries(zend_module_entry *module)
                module_number = 0;
        }
        PUTS("<table border=5 width=\"600\">\n");
-       php_info_print_table_header(3, "Directive", "Master Value", "Local Value");
+       php_info_print_table_header(3, "Directive", "Local Value", "Master Value");
        zend_hash_apply_with_argument(&known_directives, (int (*)(void *, void *)) php_ini_displayer, (void *) module_number);
        PUTS("</table>\n");
 }