]> granicus.if.org Git - php/commitdiff
More TSRMLS_FETCH work. Got it under 400 now.
authorZeev Suraski <zeev@php.net>
Tue, 31 Jul 2001 06:28:05 +0000 (06:28 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 31 Jul 2001 06:28:05 +0000 (06:28 +0000)
21 files changed:
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/exec.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/head.c
ext/standard/iptc.c
ext/standard/pageinfo.c
ext/zlib/zlib.c
main/SAPI.c
main/SAPI.h
main/fopen_wrappers.c
main/fopen_wrappers.h
main/main.c
main/output.c
main/php_logos.c
main/php_logos.h
main/safe_mode.c
sapi/pi3web/pi3web_sapi.c
sapi/servlet/servlet.c
sapi/tux/php_tux.c

index 22e0e1bffbda4571de55bb94579f74d03d3d3077..8323bfb0f01ad46ebc8e5fe228eea15855d4661b 100644 (file)
@@ -779,13 +779,13 @@ PHP_MINIT_FUNCTION(basic)
 #endif
 
        if(PG(allow_url_fopen)) {
-               if (FAILURE==php_register_url_wrapper("http", php_fopen_url_wrap_http)) {
+               if (FAILURE==php_register_url_wrapper("http", php_fopen_url_wrap_http TSRMLS_CC)) {
                        return FAILURE;
                }
-               if (FAILURE==php_register_url_wrapper("ftp", php_fopen_url_wrap_ftp)) {
+               if (FAILURE==php_register_url_wrapper("ftp", php_fopen_url_wrap_ftp TSRMLS_CC)) {
                        return FAILURE;
                }
-               if (FAILURE==php_register_url_wrapper("php", php_fopen_url_wrap_php)) {
+               if (FAILURE==php_register_url_wrapper("php", php_fopen_url_wrap_php TSRMLS_CC)) {
                        return FAILURE;
                }
        }
@@ -803,9 +803,9 @@ PHP_MSHUTDOWN_FUNCTION(basic)
 #endif
 
        if(PG(allow_url_fopen)) {
-               php_unregister_url_wrapper("http");
-               php_unregister_url_wrapper("ftp");
-               php_unregister_url_wrapper("php");
+               php_unregister_url_wrapper("http" TSRMLS_CC);
+               php_unregister_url_wrapper("ftp" TSRMLS_CC);
+               php_unregister_url_wrapper("php" TSRMLS_CC);
        }
 
        UNREGISTER_INI_ENTRIES();
@@ -998,7 +998,7 @@ PHP_FUNCTION(getenv)
        }
 
 
-       ptr = sapi_getenv(Z_STRVAL_PP(str), Z_STRLEN_PP(str));
+       ptr = sapi_getenv(Z_STRVAL_PP(str), Z_STRLEN_PP(str) TSRMLS_CC);
        if (!ptr) {
                ptr = getenv(Z_STRVAL_PP(str));
        }
@@ -1161,7 +1161,7 @@ PHP_FUNCTION(strval)
    Flush the output buffer */
 PHP_FUNCTION(flush)
 {
-       sapi_flush();
+       sapi_flush(TSRMLS_C);
 }
 /* }}} */
 
index f691e6e307964ddaae8ce3c8b2bc084608d3464a..dfa215bad154d0ecf6dbe9c32ac8f8aba1d07be3 100644 (file)
@@ -148,7 +148,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
        }
        convert_to_string_ex(arg);
 
-       if (php_check_open_basedir((*arg)->value.str.val)) {
+       if (php_check_open_basedir((*arg)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
        }
        
index ee2f41acddf00bcd61b86187558d4ad5b7963597..c094b62ee4853618b17ce7e5a991a131ce07ed8e 100644 (file)
@@ -175,7 +175,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
                
                        if (type == 1) {
                                if (output) PUTS(buf);
-                               sapi_flush();
+                               sapi_flush(TSRMLS_C);
                        }
                        else if (type == 2) {
                                /* strip trailing whitespaces */        
index 107bc67abff74e5c5e753659f0b66717f8862dc2..99b94ed3b570759c72aa2fef625084497f0cb4c9 100644 (file)
@@ -1907,7 +1907,7 @@ PHP_FUNCTION(copy)
                RETURN_FALSE;
        }
 
-       if (php_check_open_basedir((*source)->value.str.val)) {
+       if (php_check_open_basedir((*source)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
        }
 
@@ -1915,7 +1915,7 @@ PHP_FUNCTION(copy)
                RETURN_FALSE;
        }
 
-       if (php_check_open_basedir((*target)->value.str.val)) {
+       if (php_check_open_basedir((*target)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
        }
 
index 4cc224b81f1c32dfacf0f3acfae9ed2fd23f9691..e01c814038e30c04652188a1956345e36cbed428 100644 (file)
@@ -141,7 +141,9 @@ PHP_FUNCTION(disk_total_space)
 
        convert_to_string_ex(path);
 
-       if (php_check_open_basedir((*path)->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir((*path)->value.str.val TSRMLS_CC)) {
+               RETURN_FALSE;
+       }
 
 #ifdef WINDOWS
        /* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2,
@@ -242,7 +244,9 @@ PHP_FUNCTION(disk_free_space)
 
        convert_to_string_ex(path);
 
-       if (php_check_open_basedir((*path)->value.str.val)) RETURN_FALSE;
+       if (php_check_open_basedir((*path)->value.str.val TSRMLS_CC)) {
+               RETURN_FALSE;
+       }
 
 #ifdef WINDOWS
        /* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2,
@@ -335,8 +339,9 @@ PHP_FUNCTION(chgrp)
        }
 
        /* Check the basedir */
-       if (php_check_open_basedir((*filename)->value.str.val))
+       if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
+       }
 
        ret = VCWD_CHOWN((*filename)->value.str.val, -1, gid);
        if (ret == -1) {
@@ -382,8 +387,9 @@ PHP_FUNCTION(chown)
        }
 
        /* Check the basedir */
-       if (php_check_open_basedir((*filename)->value.str.val))
+       if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
+       }
 
        ret = VCWD_CHOWN((*filename)->value.str.val, uid, -1);
        if (ret == -1) {
@@ -414,8 +420,9 @@ PHP_FUNCTION(chmod)
        }
 
        /* Check the basedir */
-       if (php_check_open_basedir((*filename)->value.str.val))
+       if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
+       }
 
        imode = (mode_t) (*mode)->value.lval;
        /* in safe mode, do not allow to setuid files.
@@ -476,8 +483,10 @@ PHP_FUNCTION(touch)
        }
 
        /* Check the basedir */
-       if (php_check_open_basedir((*filename)->value.str.val)) {
-               if (newtime) efree(newtime);
+       if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) {
+               if (newtime) {
+                       efree(newtime);
+               }
                RETURN_FALSE;
        }
 
index b4df2645ff2b44c4b5f970f78a6a7b09774389ed..8a35627cfa1a6113b2409c21d18c9aa3b84583f7 100644 (file)
@@ -53,7 +53,7 @@ PHP_FUNCTION(header)
                case 1:
                        convert_to_string_ex(arg1);
        }
-       sapi_add_header_ex(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), 1, replace);
+       sapi_add_header_ex(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), 1, replace TSRMLS_CC);
 }
 /* }}} */
 
@@ -61,7 +61,7 @@ PHPAPI int php_header()
 {
        TSRMLS_FETCH();
 
-       if (sapi_send_headers()==FAILURE || SG(request_info).headers_only) {
+       if (sapi_send_headers(TSRMLS_C)==FAILURE || SG(request_info).headers_only) {
                return 0; /* don't allow output */
        } else {
                return 1; /* allow output */
index 8fb51fb9a3ff7151877c98c831fe1231310190da..096d0de42c201cc3fa4af7b024abe60f3708c165 100644 (file)
@@ -210,8 +210,9 @@ PHP_FUNCTION(iptcembed)
         break;
     }
 
-    if (php_check_open_basedir((*jpeg_file)->value.str.val)) 
+    if (php_check_open_basedir((*jpeg_file)->value.str.val TSRMLS_CC)) {
                RETURN_FALSE;
+       }
 
     if ((fp = VCWD_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
         php_error(E_WARNING, "Unable to open %s", (*jpeg_file)->value.str.val);
index 5c52d977625d9c297be543a2aa9d5fb54ee8b9b2..cc5e8451e11de5c852f5d8eedd53eb48f780d107 100644 (file)
@@ -47,7 +47,7 @@ static void php_statpage(TSRMLS_D)
 {
        struct stat *pstat;
 
-       pstat = sapi_get_stat();
+       pstat = sapi_get_stat(TSRMLS_C);
 
        if (BG(page_uid)==-1 || BG(page_gid)==-1) {
                if(pstat) {
index 112d745af9c815b1fe8f6cf2d767ae0eceaf6692..e70d9fa49d7bbcc051c5c42b2ff5a1f831a6bcb9 100644 (file)
@@ -165,7 +165,7 @@ PHP_MINIT_FUNCTION(zlib)
 #if HAVE_FOPENCOOKIE
 
        if(PG(allow_url_fopen)) {
-               php_register_url_wrapper("zlib",zlib_fopen_wrapper);
+               php_register_url_wrapper("zlib",zlib_fopen_wrapper TSRMLS_CC);
        }
 #endif
 
@@ -202,7 +202,7 @@ PHP_MSHUTDOWN_FUNCTION(zlib)
 {
 #if HAVE_FOPENCOOKIE
        if(PG(allow_url_fopen)) {
-           php_unregister_url_wrapper("zlib"); 
+           php_unregister_url_wrapper("zlib" TSRMLS_CC); 
     }
 #endif
        
index 08fa6afcc59807d90f2c81d6588ab37b313cd8a5..b38fd1edb52ef22ae19e40d686bf24d5717dade7 100644 (file)
@@ -366,12 +366,11 @@ static int sapi_extract_response_code(const char *header_line)
 /* This function expects a *duplicated* string, that was previously emalloc()'d.
  * Pointers sent to this functions will be automatically freed by the framework.
  */
-SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace)
+SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC)
 {
        int retval, free_header = 0;
        sapi_header_struct sapi_header;
        char *colon_offset;
-       TSRMLS_FETCH();
 
        if (SG(headers_sent) && !SG(request_info).no_headers) {
                char *output_start_filename = php_get_output_start_filename();
@@ -465,11 +464,10 @@ SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bo
 }
 
 
-SAPI_API int sapi_send_headers()
+SAPI_API int sapi_send_headers(TSRMLS_D)
 {
        int retval;
        int ret = FAILURE;
-       TSRMLS_FETCH();
 
        if (SG(headers_sent) || SG(request_info).no_headers) {
                return SUCCESS;
@@ -555,11 +553,9 @@ SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRML
 }
 
 
-SAPI_API int sapi_flush()
+SAPI_API int sapi_flush(TSRMLS_D)
 {
        if (sapi_module.flush) {
-               TSRMLS_FETCH();
-
                sapi_module.flush(SG(server_context));
                return SUCCESS;
        } else {
@@ -567,10 +563,8 @@ SAPI_API int sapi_flush()
        }
 }
 
-SAPI_API struct stat *sapi_get_stat()
+SAPI_API struct stat *sapi_get_stat(TSRMLS_D)
 {
-       TSRMLS_FETCH();
-
        if (sapi_module.get_stat) {
                return sapi_module.get_stat(TSRMLS_C);
        } else {
@@ -582,11 +576,9 @@ SAPI_API struct stat *sapi_get_stat()
 }
 
 
-SAPI_API char *sapi_getenv(char *name, size_t name_len)
+SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC)
 {
        if (sapi_module.getenv) {
-               TSRMLS_FETCH();
-
                return sapi_module.getenv(name, name_len TSRMLS_CC);
        } else {
                return NULL;
index 95015a7f81cabbc8b1b4bb169350819e0dbe343f..def26a08f307b491b50de64d595ff0ab4540832d 100644 (file)
@@ -130,10 +130,10 @@ SAPI_API void sapi_activate(TSRMLS_D);
 SAPI_API void sapi_deactivate(TSRMLS_D);
 SAPI_API void sapi_initialize_empty_request(TSRMLS_D);
 
-SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace);
+SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC);
 #define sapi_add_header(header_line, header_line_len, duplicate) \
-       sapi_add_header_ex((header_line), (header_line_len), (duplicate), 1)
-SAPI_API int sapi_send_headers(void);
+       sapi_add_header_ex((header_line), (header_line_len), (duplicate), 1 TSRMLS_CC)
+SAPI_API int sapi_send_headers(TSRMLS_D);
 SAPI_API void sapi_free_header(sapi_header_struct *sapi_header);
 SAPI_API void sapi_handle_post(void *arg TSRMLS_DC);
 
@@ -142,9 +142,9 @@ SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry);
 SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry);
 SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D));
 
-SAPI_API int sapi_flush(void);
-SAPI_API struct stat *sapi_get_stat(void);
-SAPI_API char *sapi_getenv(char *name, size_t name_len);
+SAPI_API int sapi_flush(TSRMLS_D);
+SAPI_API struct stat *sapi_get_stat(TSRMLS_D);
+SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC);
 
 SAPI_API char *sapi_get_default_content_type(TSRMLS_D);
 SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header TSRMLS_DC);
index df72859581d7ca60e6eaa422a2df6a6fd45dae2d..b3ecfcbfa30f20032f89b44503576c3706c95df3 100644 (file)
@@ -90,10 +90,8 @@ HashTable fopen_url_wrappers_hash;
 
 /* {{{ php_register_url_wrapper
  */
-PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path))
+PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) TSRMLS_DC)
 {
-       TSRMLS_FETCH();
-
        if(PG(allow_url_fopen)) {
                return zend_hash_add(&fopen_url_wrappers_hash, protocol, strlen(protocol), &wrapper, sizeof(wrapper), NULL);
        } else {
@@ -104,10 +102,8 @@ PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path
 
 /* {{{ php_unregister_url_wrapper
  */
-PHPAPI int php_unregister_url_wrapper(char *protocol)
+PHPAPI int php_unregister_url_wrapper(char *protocol TSRMLS_DC)
 {
-       TSRMLS_FETCH();
-
        if(PG(allow_url_fopen)) {
                return zend_hash_del(&fopen_url_wrappers_hash, protocol, strlen(protocol));
        } else {
@@ -118,27 +114,22 @@ PHPAPI int php_unregister_url_wrapper(char *protocol)
 
 /* {{{ php_init_fopen_wrappers
  */
-int php_init_fopen_wrappers(void
+int php_init_fopen_wrappers(TSRMLS_D
 {
-       TSRMLS_FETCH();
-
-       if(PG(allow_url_fopen)) 
+       if(PG(allow_url_fopen)) {
                return zend_hash_init(&fopen_url_wrappers_hash, 0, NULL, NULL, 1);
-       
+       }
        return SUCCESS;
 }
 /* }}} */
 
 /* {{{ php_shutdown_fopen_wrappers
  */
-int php_shutdown_fopen_wrappers(void) 
+int php_shutdown_fopen_wrappers(TSRMLS_D)
 {
-       TSRMLS_FETCH();
-
        if(PG(allow_url_fopen)) {
                zend_hash_destroy(&fopen_url_wrappers_hash);
        }
-
        return SUCCESS;
 }
 /* }}} */
@@ -196,10 +187,8 @@ PHPAPI int php_check_specific_open_basedir(char *basedir, char *path TSRMLS_DC)
 
 /* {{{ php_check_open_basedir
  */
-PHPAPI int php_check_open_basedir(char *path)
+PHPAPI int php_check_open_basedir(char *path TSRMLS_DC)
 {
-       TSRMLS_FETCH();
-
        /* Only check when open_basedir is available */
        if (PG(open_basedir) && *PG(open_basedir)) {
                char *pathbuf;
@@ -240,8 +229,9 @@ PHPAPI int php_check_open_basedir(char *path)
 static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **opened_path)
 {
        FILE *fp;
+       TSRMLS_FETCH();
 
-       if (php_check_open_basedir((char *)path)) {
+       if (php_check_open_basedir((char *)path TSRMLS_CC)) {
                return NULL;
        }
        fp = VCWD_FOPEN(path, mode);
index 18a8610c035f004624cb507b5c4537b3d1e2022a..040dae6cb69253b0dcb8b663913e7b981c5314f5 100644 (file)
@@ -69,7 +69,7 @@ PHPAPI FILE *php_fopen_wrapper(char *filename, char *mode, int options, int *iss
 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle);
 PHPAPI char *expand_filepath(const char *filepath, char *real_path);
 
-PHPAPI int php_check_open_basedir(char *path);
+PHPAPI int php_check_open_basedir(char *path TSRMLS_DC);
 PHPAPI int php_check_specific_open_basedir(char *basedir, char *path TSRMLS_DC);
 
 PHPAPI FILE *php_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
@@ -78,10 +78,10 @@ PHPAPI int php_is_url(char *path);
 PHPAPI char *php_strip_url_passwd(char *path);
 
 
-int php_init_fopen_wrappers(void); 
-int php_shutdown_fopen_wrappers(void); 
-PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path));
-PHPAPI int php_unregister_url_wrapper(char *protocol);
+int php_init_fopen_wrappers(TSRMLS_D);
+int php_shutdown_fopen_wrappers(TSRMLS_D);
+PHPAPI int php_register_url_wrapper(char *protocol, FILE * (*wrapper)(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path) TSRMLS_DC);
+PHPAPI int php_unregister_url_wrapper(char *protocol TSRMLS_DC);
 
 #endif
 /*
index 8e9c1c0dc23b56a53af2992c978388c0582318c6..87bf427aad11dcc6a67b34a7bb731a3ceb1d455e 100644 (file)
@@ -686,7 +686,7 @@ void php_request_shutdown(void *dummy)
        } zend_end_try();
 
        zend_try {
-               sapi_send_headers();
+               sapi_send_headers(TSRMLS_C);
        } zend_end_try();
 
        if (PG(modules_activated)) zend_try {
@@ -860,7 +860,7 @@ int php_module_startup(sapi_module_struct *sf)
        /* initialize fopen wrappers registry 
           (this uses configuration parameters from php.ini)
         */
-       if (php_init_fopen_wrappers() == FAILURE) {
+       if (php_init_fopen_wrappers(TSRMLS_C) == FAILURE) {
                php_printf("PHP:  Unable to initialize fopen url wrappers.\n");
                return FAILURE;
        }
@@ -959,10 +959,10 @@ void php_module_shutdown()
 #endif
 
        php_shutdown_ticks(TSRMLS_C);
-       sapi_flush();
+       sapi_flush(TSRMLS_C);
 
        zend_shutdown(TSRMLS_C);
-       php_shutdown_fopen_wrappers();
+       php_shutdown_fopen_wrappers(TSRMLS_C);
        php_shutdown_info_logos();
        UNREGISTER_INI_ENTRIES();
 #ifndef ZTS
@@ -1177,7 +1177,7 @@ PHPAPI int php_handle_special_queries(TSRMLS_D)
 {
        if (SG(request_info).query_string && SG(request_info).query_string[0]=='=' 
                        && PG(expose_php)) {
-               if (php_info_logos(SG(request_info).query_string+1)) {  
+               if (php_info_logos(SG(request_info).query_string+1 TSRMLS_CC)) {
                        return 1;
                } else if (!strcmp(SG(request_info).query_string+1, PHP_CREDITS_GUID)) {
                        php_print_credits(PHP_CREDITS_ALL);
index cf5272acdd05f4b9b8eb60436e8654174745d11b..4e52d458f467829e949a2af5654726d6889770eb 100644 (file)
@@ -470,7 +470,7 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
        result = OG(php_header_write)(str, str_length);
 
        if (OG(implicit_flush)) {
-               sapi_flush();
+               sapi_flush(TSRMLS_C);
        }
 
        return result;
index c9eb588911be1625f42b81285b781fe68c1ffa9b..eb3c523492218525233defa70ea72249611f0715 100644 (file)
@@ -67,7 +67,7 @@ int php_shutdown_info_logos(void)
 }
 
 #define CONTENT_TYPE_HEADER "Content-Type: "
-int php_info_logos(const char *logo_string)
+int php_info_logos(const char *logo_string TSRMLS_DC)
 {
        php_info_logo *logo_image;
        char *content_header;
index 42df0a87ae98bafe232f0c31bad0fde3738e5693..e6e2028baee072373f505e0d1947a40679466682 100644 (file)
@@ -5,6 +5,6 @@ PHPAPI int php_register_info_logo(char *logo_string, char *mimetype, unsigned ch
 PHPAPI int php_unregister_info_logo(char *logo_string);
 int php_init_info_logos(void);
 int php_shutdown_info_logos(void);
-int php_info_logos(const char *logo_string);
+int php_info_logos(const char *logo_string TSRMLS_DC);
 
 #endif /* _PHP_LOGOS_H */
index fdf6f161dea32078e64e39a285f8fa770128c7e8..675a3d7ab49c974cb27e1d983d1858f0adcf4a8c 100644 (file)
@@ -166,7 +166,7 @@ PHPAPI char *php_get_current_user()
        USE_SAPI is defined, because cgi will also be
        interfaced in USE_SAPI */
 
-       pstat = sapi_get_stat();
+       pstat = sapi_get_stat(TSRMLS_C);
 
        if (!pstat) {
                return empty_string;
index 66c5be17830169d5e5f7501323d630c0a2ebd4e6..3a52e14cd23d82685d0ddc71c27aa702e019dc1f 100644 (file)
@@ -413,7 +413,7 @@ DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB)
                                break;
                        case PHP_MODE_INDENT:
                                header_line = (char *)estrdup("Content-Type: text/plain");
-                               sapi_add_header_ex(header_line, strlen(header_line), 1, 1);
+                               sapi_add_header_ex(header_line, strlen(header_line), 1, 1 TSRMLS_CC);
                                if ( open_file_for_scanning( &file_handle TSRMLS_CC ) == SUCCESS )
                                        {
                                        zend_indent();
index 364d0c51b22ffc25e01f8242c8c527f54fded923..a8ecd3a8d9973d6d10ed8c6d95425e302a874211 100644 (file)
@@ -318,8 +318,6 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
        char cwd[MAXPATHLEN];
 #endif
        TSRMLS_FETCH();
-       TSRMLS_FETCH();
-       TSRMLS_FETCH();
 
        zend_try {
                SG(server_context) = emalloc(sizeof(servlet_request));
@@ -379,7 +377,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
 
                        if (open_file_for_scanning(&file_handle TSRMLS_CC)==SUCCESS) {
                                php_get_highlight_struct(&syntax_highlighter_ini);
-                               sapi_send_headers();
+                               sapi_send_headers(TSRMLS_C);
                                zend_highlight(&syntax_highlighter_ini TSRMLS_CC);
                        }
                } else {
index 215e4d5cbe9e0f770d5a2cc8219ec56803733e69..482e5be6df1f2080593d2ed57c0f3dd27116a2d5 100644 (file)
@@ -186,7 +186,7 @@ static void sapi_tux_register_variables(zval *track_vars_array TSRMLS_DC)
 
        
        sprintf(buf, "Server: %s", TUXAPI_version);
-       sapi_add_header_ex(buf, strlen(buf), 1, 0);
+       sapi_add_header_ex(buf, strlen(buf), 1, 0 TSRMLS_CC);
        php_register_variable("PHP_SELF", SG(request_info).request_uri, track_vars_array TSRMLS_FETCH()CC TSRMLS_FETCH()CC);
        php_register_variable("SERVER_SOFTWARE", TUXAPI_version, track_vars_array TSRMLS_FETCH()CC TSRMLS_FETCH()CC);
        php_register_variable("GATEWAY_INTERFACE", "CGI/1.1", track_vars_array TSRMLS_FETCH()CC TSRMLS_FETCH()CC);