Home
last modified time | relevance | path

Searched refs:SG (Results 1 – 25 of 42) sorted by relevance

12

/PHP-7.4/main/
H A DSAPI.c167 if (SG(request_info).post_entry && SG(request_info).content_type_dup) { in sapi_handle_post()
250 SG(post_read) = 1; in sapi_read_post_block()
258 if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) { in SAPI_POST_READER_FUNC()
260 SG(request_info).content_length, SG(post_max_size)); in SAPI_POST_READER_FUNC()
284 if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) { in SAPI_POST_READER_FUNC()
452 SG(post_read) = 0; in sapi_activate()
547 SG(request_info).auth_digest = SG(request_info).auth_user = SG(request_info).auth_password = NULL; in sapi_initialize_empty_request()
661 if (SG(headers_sent) && !SG(request_info).no_headers) { in sapi_header_op()
844 if (SG(headers_sent) || SG(request_info).no_headers) { in sapi_send_headers()
1012 …if (!SG(request_info).path_translated || (VCWD_STAT(SG(request_info).path_translated, &SG(global_s… in sapi_get_stat()
[all …]
H A Dphp_content_types.c38 if (!strcmp(SG(request_info).request_method, "POST")) { in SAPI_POST_READER_FUNC()
39 if (NULL == SG(request_info).post_entry) { in SAPI_POST_READER_FUNC()
H A Dphp_variables.c459 c_var = SG(request_info).query_string; in SAPI_TREAT_DATA_FUNC()
467 c_var = SG(request_info).cookie_data; in SAPI_TREAT_DATA_FUNC()
667 if (SG(request_info).argc) { in php_build_argv()
668 ZVAL_LONG(&argc, SG(request_info).argc); in php_build_argv()
673 if (SG(request_info).argc) { in php_build_argv()
705 if (SG(request_info).auth_user) { in php_register_server_variables()
709 if (SG(request_info).auth_password) { in php_register_server_variables()
713 if (SG(request_info).auth_digest) { in php_register_server_variables()
791 !SG(headers_sent) && in php_auto_globals_create_post()
792 SG(request_info).request_method && in php_auto_globals_create_post()
[all …]
H A Dfopen_wrappers.c368 path_info = SG(request_info).request_uri;
425 filename = SG(request_info).path_translated;
443 if (SG(request_info).path_translated) {
444 efree(SG(request_info).path_translated);
445 SG(request_info).path_translated = NULL;
460 if (SG(request_info).path_translated) {
461 efree(SG(request_info).path_translated);
462 SG(request_info).path_translated = NULL;
469 if (SG(request_info).path_translated) {
470 efree(SG(request_info).path_translated);
[all …]
H A Dmain.c103 char *hint = SG(default_charset); in get_safe_charset_hint()
587 } else if (SG(default_charset)) { in php_get_internal_encoding()
588 return SG(default_charset); in php_get_internal_encoding()
596 } else if (SG(default_charset)) { in php_get_input_encoding()
597 return SG(default_charset); in php_get_input_encoding()
605 } else if (SG(default_charset)) { in php_get_output_encoding()
606 return SG(default_charset); in php_get_output_encoding()
1456 !SG(headers_sent) && in php_error_cb()
1560 SG(request_info).current_user = estrndup(pwd->pw_name, SG(request_info).current_user_length); in php_get_current_user()
1887 SG(sapi_started) = 1; in php_request_startup()
[all …]
H A Drfc1867.c202 ZEND_HASH_FOREACH_VAL(SG(rfc1867_uploaded_files), el) { in destroy_uploaded_files_hash()
206 zend_hash_destroy(SG(rfc1867_uploaded_files)); in destroy_uploaded_files_hash()
207 FREE_HASHTABLE(SG(rfc1867_uploaded_files)); in destroy_uploaded_files_hash()
266 SG(read_post_bytes) += actual_read; in fill_buffer()
713 if (SG(post_max_size) > 0 && SG(request_info).content_length > SG(post_max_size)) {
767 SG(rfc1867_uploaded_files) = uploaded_files;
779 event_start.content_length = SG(request_info).content_length;
877 event_formdata.post_bytes_processed = SG(read_post_bytes);
898 event_formdata.post_bytes_processed = SG(read_post_bytes);
1094 event_file_end.post_bytes_processed = SG(read_post_bytes);
[all …]
H A DSAPI.h140 # define SG(v) ZEND_TSRMG_FAST(sapi_globals_offset, sapi_globals_struct *, v) macro
144 # define SG(v) (sapi_globals.v)
/PHP-7.4/sapi/fpm/fpm/
H A Dfpm_main.c437 size_t remaining = SG(request_info).content_length - SG(read_post_bytes); in sapi_cgi_read_post()
583 php_self = SG(request_info).request_uri ? SG(request_info).request_uri : ""; in sapi_cgi_register_variables()
765 if (SG(sapi_started)) { in sapi_cgi_deactivate()
1664 SG(headers_sent) = 1; in main()
1702 SG(headers_sent) = 1; in main()
1717 SG(headers_sent) = 1; in main()
1736 SG(server_context) = NULL; in main()
1740 SG(headers_sent) = 1; in main()
1753 SG(headers_sent) = 1; in main()
1880 SG(server_context) = NULL; in main()
[all …]
H A Dfpm_php.c162 return SG(request_info).path_translated; in fpm_php_script_filename()
168 return (char *) SG(request_info).request_uri; in fpm_php_request_uri()
174 return (char *) SG(request_info).request_method; in fpm_php_request_method()
180 return SG(request_info).query_string; in fpm_php_query_string()
186 return SG(request_info).auth_user; in fpm_php_auth_user()
192 return SG(request_info).content_length; in fpm_php_content_length()
H A Dfpm_status.c155 if (!SG(request_info).request_uri) { in fpm_status_handle_request()
160 …if (fpm_status_ping_uri && fpm_status_ping_response && !strcmp(fpm_status_ping_uri, SG(request_inf… in fpm_status_handle_request()
165 SG(sapi_headers).http_response_code = 200; in fpm_status_handle_request()
168 if (SG(request_info).headers_only) { in fpm_status_handle_request()
177 if (fpm_status_uri && !strcmp(fpm_status_uri, SG(request_info).request_uri)) { in fpm_status_handle_request()
183 SG(sapi_headers).http_response_code = 500; in fpm_status_handle_request()
193 SG(sapi_headers).http_response_code = 503; in fpm_status_handle_request()
206 SG(sapi_headers).http_response_code = 500; in fpm_status_handle_request()
217 SG(sapi_headers).http_response_code = 200; in fpm_status_handle_request()
220 if (SG(request_info).headers_only) { in fpm_status_handle_request()
H A Dfpm_log.c234 char *env = fcgi_getenv((fcgi_request*) SG(server_context), format, strlen(format)); in fpm_log_write()
298 sapi_headers_struct *sapi_headers = &SG(sapi_headers); in fpm_log_write()
377 len2 = snprintf(b, FPM_LOG_BUFFER - len, "%d", SG(sapi_headers).http_response_code); in fpm_log_write()
/PHP-7.4/sapi/cgi/
H A Dcgi_main.c484 assert(SG(request_info).content_length >= SG(read_post_bytes)); in sapi_cgi_read_post()
486 remaining_bytes = (size_t)(SG(request_info).content_length - SG(read_post_bytes)); in sapi_cgi_read_post()
511 size_t remaining = SG(request_info).content_length - SG(read_post_bytes); in sapi_fcgi_read_post()
749 php_self = SG(request_info).request_uri ? SG(request_info).request_uri : ""; in sapi_cgi_register_variables()
958 if (SG(sapi_started)) {
2296 SG(headers_sent) = 1;
2428 if (SG(request_info).path_translated) efree(SG(request_info).path_translated);
2437 if (SG(request_info).path_translated) efree(SG(request_info).path_translated);
2445 SG(headers_sent) = 1;
2505 SG(headers_sent) = 1;
[all …]
/PHP-7.4/sapi/apache2handler/
H A Dsapi_apache2.c72 ctx = SG(server_context); in ZEND_TSRMLS_CACHE_DEFINE()
88 ctx = SG(server_context); in php_apache_sapi_header_handler()
147 php_struct *ctx = SG(server_context); in php_apache_sapi_send_headers()
178 php_struct *ctx = SG(server_context); in php_apache_sapi_read_post()
209 php_struct *ctx = SG(server_context); in php_apache_sapi_get_stat()
232 php_struct *ctx = SG(server_context); in php_apache_sapi_read_cookies()
244 php_struct *ctx = SG(server_context); in php_apache_sapi_getenv()
297 SG(headers_sent) = 1; in php_apache_sapi_flush()
309 ctx = SG(server_context); in php_apache_sapi_log_message()
588 ctx = SG(server_context); in php_handler()
[all …]
H A Dphp_functions.c59 php_struct *ctx = SG(server_context); in php_apache_lookup_uri()
183 ctx = SG(server_context); in PHP_FUNCTION()
207 ctx = SG(server_context); in PHP_FUNCTION()
230 ctx = SG(server_context); in PHP_FUNCTION()
264 ctx = SG(server_context); in PHP_FUNCTION()
300 ctx = SG(server_context); in PHP_FUNCTION()
371 server_rec *serv = ((php_struct *) SG(server_context))->r->server; in PHP_MINFO_FUNCTION()
439 …const apr_array_header_t *arr = apr_table_elts(((php_struct *) SG(server_context))->r->subprocess_… in PHP_MINFO_FUNCTION()
457 php_info_print_table_row(2, "HTTP Request", ((php_struct *) SG(server_context))->r->the_request); in PHP_MINFO_FUNCTION()
459 arr = apr_table_elts(((php_struct *) SG(server_context))->r->headers_in); in PHP_MINFO_FUNCTION()
[all …]
/PHP-7.4/sapi/litespeed/
H A Dlsapi_main.c181 if ( SG(request_info).path_translated ) { in sapi_lsapi_deactivate()
183 SG(request_info).path_translated = NULL; in sapi_lsapi_deactivate()
270 if ( (SG(request_info).request_uri ) ) in sapi_lsapi_register_variables()
381 if (SG(request_info).no_headers == 1) { in sapi_lsapi_send_headers_like_cgi()
558 if (!SG(request_info).path_translated) { in sapi_lsapi_activate()
651 SG(sapi_headers).http_response_code = 200; in init_request_info()
1128 SG(server_context) = (void *) 1; in processReq()
1253 SG(server_context) = (void *) 1; in cli_main()
1257 SG(options) |= SAPI_OPTION_NO_CHDIR; in cli_main()
1513 SG(request_info).path_translated = NULL; in main()
[all …]
/PHP-7.4/sapi/embed/
H A Dphp_embed.c205 SG(options) |= SAPI_OPTION_NO_CHDIR; in php_embed_init()
206 SG(request_info).argc=argc; in php_embed_init()
207 SG(request_info).argv=argv; in php_embed_init()
214 SG(headers_sent) = 1; in php_embed_init()
215 SG(request_info).no_headers = 1; in php_embed_init()
/PHP-7.4/ext/standard/
H A Dhead.c72 if (sapi_send_headers()==FAILURE || SG(request_info).headers_only) { in php_header()
353 if (SG(headers_sent)) { in PHP_FUNCTION()
370 if (SG(headers_sent)) { in PHP_FUNCTION()
398 …zend_llist_apply_with_argument(&SG(sapi_headers).headers, php_head_apply_header_list_to_hash, retu… in PHP_FUNCTION()
417 old_response_code = SG(sapi_headers).http_response_code; in PHP_FUNCTION()
418 SG(sapi_headers).http_response_code = (int)response_code; in PHP_FUNCTION()
427 if (!SG(sapi_headers).http_response_code) { in PHP_FUNCTION()
431 RETURN_LONG(SG(sapi_headers).http_response_code); in PHP_FUNCTION()
H A Dphp_fopen_wrapper.c83 if (!SG(post_read) && SG(read_post_bytes) < (int64_t)(input->position + count)) { in php_stream_input_read()
230 if ((input->body = SG(request_info).request_body)) { in php_stream_url_wrap_php()
234 SG(request_info).request_body = input->body; in php_stream_url_wrap_php()
/PHP-7.4/ext/session/tests/
H A Dbug74514.phpt11 but it still uses SG(headers_sent).
13 CLI works as Web server, so SG(headers_sent) cannot be ignored nor changed.
/PHP-7.4/sapi/cli/
H A Dphp_cli_server.c396 client = SG(server_context); in PHP_FUNCTION()
581 if (!SG(headers_sent)) { in sapi_cli_server_flush()
583 SG(headers_sent) = 1; in sapi_cli_server_flush()
737 if (SG(request_info).path_translated) { in sapi_cli_server_register_variables()
2205 SG(server_context) = NULL; in php_cli_server_request_shutdown()
2206 SG(rfc1867_uploaded_files) = NULL; in php_cli_server_request_shutdown()
2253 SG(server_context) = client; in php_cli_server_dispatch()
2262 SG(server_context) = NULL; in php_cli_server_dispatch()
2296 SG(rfc1867_uploaded_files) = NULL; in php_cli_server_dispatch()
2301 SG(server_context) = NULL; in php_cli_server_dispatch()
[all …]
H A Dphp_cli.c375 if(SG(request_info).argv0) { in sapi_cli_deactivate()
376 free(SG(request_info).argv0); in sapi_cli_deactivate()
377 SG(request_info).argv0 = NULL; in sapi_cli_deactivate()
698 SG(options) |= SAPI_OPTION_NO_CHDIR; in do_cli()
922 SG(request_info).argc=argc-php_optind+1; in do_cli()
925 SG(request_info).path_translated = translated_path? translated_path: (char*)file_handle.filename; in do_cli()
927 SG(request_info).argv=argv+php_optind-1; in do_cli()
/PHP-7.4/ext/mbstring/
H A Dmb_gpc.c93 c_var = SG(request_info).query_string; in ZEND_EXTERN_MODULE_GLOBALS()
100 c_var = SG(request_info).cookie_data; in ZEND_EXTERN_MODULE_GLOBALS()
369 php_stream_rewind(SG(request_info).request_body); in SAPI_POST_HANDLER_FUNC()
370 post_data_str = php_stream_copy_to_mem(SG(request_info).request_body, PHP_STREAM_COPY_ALL, 0); in SAPI_POST_HANDLER_FUNC()
/PHP-7.4/sapi/phpdbg/
H A Dphpdbg_wait.c174 if (SG(request_info).request_body) { in phpdbg_webdata_decompress()
175 php_stream_close(SG(request_info).request_body); in phpdbg_webdata_decompress()
177SG(request_info).request_body = php_stream_temp_create_ex(TEMP_STREAM_DEFAULT, SAPI_POST_BLOCK_SIZ… in phpdbg_webdata_decompress()
178 php_stream_truncate_set_size(SG(request_info).request_body, 0); in phpdbg_webdata_decompress()
179 php_stream_write(SG(request_info).request_body, Z_STRVAL_P(zvp), Z_STRLEN_P(zvp)); in phpdbg_webdata_decompress()
H A Dphpdbg.c263 if (SG(request_info).argv0) { in PHP_MSHUTDOWN_FUNCTION()
264 free(SG(request_info).argv0); in PHP_MSHUTDOWN_FUNCTION()
265 SG(request_info).argv0 = NULL; in PHP_MSHUTDOWN_FUNCTION()
1788 if (SG(sapi_headers).mimetype) { in main()
1789 efree(SG(sapi_headers).mimetype); in main()
1790 SG(sapi_headers).mimetype = NULL; in main()
1799 SG(request_info).argv = emalloc(SG(request_info).argc * sizeof(char *)); in main()
1800 for (i = SG(request_info).argc; --i;) { in main()
2079 for (i = SG(request_info).argc; i--;) { in main()
2080 efree(SG(request_info).argv[i]); in main()
[all …]
/PHP-7.4/ext/session/
H A Dsession.c1146 path = SG(request_info).path_translated; in last_modified()
1225 if (SG(headers_sent)) { in php_session_cache_limiter()
1302 if (SG(headers_sent)) { in php_session_send_cookie()
1700 if (SG(headers_sent)) { in PHP_FUNCTION()
1864 if (name && SG(headers_sent)) { in PHP_FUNCTION()
1895 if (name && SG(headers_sent)) { in PHP_FUNCTION()
1950 if (SG(headers_sent)) { in PHP_FUNCTION()
2105 if (name && SG(headers_sent)) { in PHP_FUNCTION()
2184 if (SG(headers_sent)) { in PHP_FUNCTION()
2339 if (limiter && SG(headers_sent)) { in PHP_FUNCTION()
[all …]

Completed in 110 milliseconds

12