version 1.1, 2012/02/21 23:48:06
|
version 1.1.1.4, 2014/06/15 20:04:02
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 272 PHP_MINFO_FUNCTION(apache)
|
Line 272 PHP_MINFO_FUNCTION(apache)
|
env_arr = table_elts(r->headers_in); |
env_arr = table_elts(r->headers_in); |
env = (table_entry *)env_arr->elts; |
env = (table_entry *)env_arr->elts; |
for (i = 0; i < env_arr->nelts; ++i) { |
for (i = 0; i < env_arr->nelts; ++i) { |
if (env[i].key && (!PG(safe_mode) || (PG(safe_mode) && strncasecmp(env[i].key, "authorization", 13)))) { | if (env[i].key) { |
php_info_print_table_row(2, env[i].key, env[i].val); |
php_info_print_table_row(2, env[i].key, env[i].val); |
} |
} |
} |
} |
Line 350 PHP_FUNCTION(virtual)
|
Line 350 PHP_FUNCTION(virtual)
|
int filename_len; |
int filename_len; |
request_rec *rr = NULL; |
request_rec *rr = NULL; |
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) { |
return; |
return; |
} |
} |
|
|
Line 368 PHP_FUNCTION(virtual)
|
Line 368 PHP_FUNCTION(virtual)
|
RETURN_FALSE; |
RETURN_FALSE; |
} |
} |
|
|
php_end_ob_buffers(1 TSRMLS_CC); | php_output_end_all(TSRMLS_C); |
php_header(TSRMLS_C); |
php_header(TSRMLS_C); |
|
|
if (run_sub_req(rr)) { |
if (run_sub_req(rr)) { |
Line 401 PHP_FUNCTION(apache_request_headers)
|
Line 401 PHP_FUNCTION(apache_request_headers)
|
env_arr = table_elts(((request_rec *) SG(server_context))->headers_in); |
env_arr = table_elts(((request_rec *) SG(server_context))->headers_in); |
tenv = (table_entry *)env_arr->elts; |
tenv = (table_entry *)env_arr->elts; |
for (i = 0; i < env_arr->nelts; ++i) { |
for (i = 0; i < env_arr->nelts; ++i) { |
if (!tenv[i].key || | if (!tenv[i].key) { |
(PG(safe_mode) && | |
!strncasecmp(tenv[i].key, "authorization", 13))) { | |
continue; |
continue; |
} |
} |
if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) { |
if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) { |
Line 533 PHP_FUNCTION(apache_lookup_uri)
|
Line 531 PHP_FUNCTION(apache_lookup_uri)
|
|
|
|
|
#if 0 |
#if 0 |
|
/* |
This function is most likely a bad idea. Just playing with it for now. |
This function is most likely a bad idea. Just playing with it for now. |
| */ |
PHP_FUNCTION(apache_exec_uri) |
PHP_FUNCTION(apache_exec_uri) |
{ |
{ |
char *filename; |
char *filename; |
int filename_len; |
int filename_len; |
request_rec *rr=NULL; |
request_rec *rr=NULL; |
TSRMLS_FETCH(); |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { |
return; |
return; |
Line 594 PHP_FUNCTION(apache_get_modules)
|
Line 592 PHP_FUNCTION(apache_get_modules)
|
Reset the Apache write timer */ |
Reset the Apache write timer */ |
PHP_FUNCTION(apache_reset_timeout) |
PHP_FUNCTION(apache_reset_timeout) |
{ |
{ |
if (PG(safe_mode)) { |
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot reset the Apache timeout in safe mode"); |
|
RETURN_FALSE; |
|
} |
|
|
|
ap_reset_timeout((request_rec *)SG(server_context)); |
ap_reset_timeout((request_rec *)SG(server_context)); |
RETURN_TRUE; |
RETURN_TRUE; |
} |
} |