php_apache.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
  16. | Stig Sæther Bakken <ssb@php.net> |
  17. | David Sklar <sklar@student.net> |
  18. +----------------------------------------------------------------------+
  19. */
  20. /* $Id$ */
  21. #include "php_apache_http.h"
  22. #if defined(PHP_WIN32) || defined(NETWARE)
  23. #include "zend.h"
  24. #include "ap_compat.h"
  25. #endif
  26. #ifdef ZTS
  27. int php_apache_info_id;
  28. #else
  29. php_apache_info_struct php_apache_info;
  30. #endif
  31. #define SECTION(name) PUTS("<h2>" name "</h2>\n")
  32. #ifndef PHP_WIN32
  33. extern module *top_module;
  34. extern module **ap_loaded_modules;
  35. #else
  36. extern __declspec(dllimport) module *top_module;
  37. extern __declspec(dllimport) module **ap_loaded_modules;
  38. #endif
  39. PHP_FUNCTION(virtual);
  40. PHP_FUNCTION(apache_request_headers);
  41. PHP_FUNCTION(apache_response_headers);
  42. PHP_FUNCTION(apachelog);
  43. PHP_FUNCTION(apache_note);
  44. PHP_FUNCTION(apache_lookup_uri);
  45. PHP_FUNCTION(apache_child_terminate);
  46. PHP_FUNCTION(apache_setenv);
  47. PHP_FUNCTION(apache_get_version);
  48. PHP_FUNCTION(apache_get_modules);
  49. PHP_FUNCTION(apache_reset_timeout);
  50. PHP_MINFO_FUNCTION(apache);
  51. ZEND_BEGIN_ARG_INFO(arginfo_apache_child_terminate, 0)
  52. ZEND_END_ARG_INFO()
  53. ZEND_BEGIN_ARG_INFO_EX(arginfo_apache_note, 0, 0, 1)
  54. ZEND_ARG_INFO(0, note_name)
  55. ZEND_ARG_INFO(0, note_value)
  56. ZEND_END_ARG_INFO()
  57. ZEND_BEGIN_ARG_INFO_EX(arginfo_apache_virtual, 0, 0, 1)
  58. ZEND_ARG_INFO(0, filename)
  59. ZEND_END_ARG_INFO()
  60. ZEND_BEGIN_ARG_INFO(arginfo_apache_request_headers, 0)
  61. ZEND_END_ARG_INFO()
  62. ZEND_BEGIN_ARG_INFO(arginfo_apache_response_headers, 0)
  63. ZEND_END_ARG_INFO()
  64. ZEND_BEGIN_ARG_INFO_EX(arginfo_apache_setenv, 0, 0, 2)
  65. ZEND_ARG_INFO(0, variable)
  66. ZEND_ARG_INFO(0, value)
  67. ZEND_ARG_INFO(0, walk_to_top)
  68. ZEND_END_ARG_INFO()
  69. ZEND_BEGIN_ARG_INFO_EX(arginfo_apache_lookup_uri, 0, 0, 1)
  70. ZEND_ARG_INFO(0, uri)
  71. ZEND_END_ARG_INFO()
  72. ZEND_BEGIN_ARG_INFO(arginfo_apache_get_version, 0)
  73. ZEND_END_ARG_INFO()
  74. ZEND_BEGIN_ARG_INFO(arginfo_apache_get_modules, 0)
  75. ZEND_END_ARG_INFO()
  76. ZEND_BEGIN_ARG_INFO(arginfo_apache_reset_timeout, 0)
  77. ZEND_END_ARG_INFO()
  78. const zend_function_entry apache_functions[] = {
  79. PHP_FE(virtual, arginfo_apache_virtual)
  80. PHP_FE(apache_request_headers, arginfo_apache_request_headers)
  81. PHP_FE(apache_note, arginfo_apache_note)
  82. PHP_FE(apache_lookup_uri, arginfo_apache_lookup_uri)
  83. PHP_FE(apache_child_terminate, arginfo_apache_child_terminate)
  84. PHP_FE(apache_setenv, arginfo_apache_setenv)
  85. PHP_FE(apache_response_headers, arginfo_apache_response_headers)
  86. PHP_FE(apache_get_version, arginfo_apache_get_version)
  87. PHP_FE(apache_get_modules, arginfo_apache_get_modules)
  88. PHP_FE(apache_reset_timeout, arginfo_apache_reset_timeout)
  89. PHP_FALIAS(getallheaders, apache_request_headers, arginfo_apache_request_headers)
  90. {NULL, NULL, NULL}
  91. };
  92. PHP_INI_BEGIN()
  93. STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateLong, xbithack, php_apache_info_struct, php_apache_info)
  94. STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateLong, engine, php_apache_info_struct, php_apache_info)
  95. STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateLong, last_modified, php_apache_info_struct, php_apache_info)
  96. STD_PHP_INI_ENTRY("child_terminate", "0", PHP_INI_ALL, OnUpdateLong, terminate_child, php_apache_info_struct, php_apache_info)
  97. PHP_INI_END()
  98. static void php_apache_globals_ctor(php_apache_info_struct *apache_globals TSRMLS_DC)
  99. {
  100. apache_globals->in_request = 0;
  101. }
  102. static PHP_MINIT_FUNCTION(apache)
  103. {
  104. #ifdef ZTS
  105. ts_allocate_id(&php_apache_info_id, sizeof(php_apache_info_struct), (ts_allocate_ctor) php_apache_globals_ctor, NULL);
  106. #else
  107. php_apache_globals_ctor(&php_apache_info TSRMLS_CC);
  108. #endif
  109. REGISTER_INI_ENTRIES();
  110. return SUCCESS;
  111. }
  112. static PHP_MSHUTDOWN_FUNCTION(apache)
  113. {
  114. UNREGISTER_INI_ENTRIES();
  115. return SUCCESS;
  116. }
  117. zend_module_entry apache_module_entry = {
  118. STANDARD_MODULE_HEADER,
  119. "apache",
  120. apache_functions,
  121. PHP_MINIT(apache),
  122. PHP_MSHUTDOWN(apache),
  123. NULL,
  124. NULL,
  125. PHP_MINFO(apache),
  126. NO_VERSION_YET,
  127. STANDARD_MODULE_PROPERTIES
  128. };
  129. /* {{{ PHP_MINFO_FUNCTION
  130. */
  131. PHP_MINFO_FUNCTION(apache)
  132. {
  133. char *apv = (char *) ap_get_server_version();
  134. module *modp = NULL;
  135. char output_buf[128];
  136. #if !defined(WIN32) && !defined(WINNT)
  137. char name[64];
  138. char modulenames[1024];
  139. char *p;
  140. #endif
  141. server_rec *serv;
  142. extern char server_root[MAX_STRING_LEN];
  143. extern uid_t user_id;
  144. extern char *user_name;
  145. extern gid_t group_id;
  146. extern int max_requests_per_child;
  147. serv = ((request_rec *) SG(server_context))->server;
  148. php_info_print_table_start();
  149. #ifdef PHP_WIN32
  150. php_info_print_table_row(1, "Apache for Windows 95/NT");
  151. php_info_print_table_end();
  152. php_info_print_table_start();
  153. #elif defined(NETWARE)
  154. php_info_print_table_row(1, "Apache for NetWare");
  155. php_info_print_table_end();
  156. php_info_print_table_start();
  157. #else
  158. php_info_print_table_row(2, "APACHE_INCLUDE", PHP_APACHE_INCLUDE);
  159. php_info_print_table_row(2, "APACHE_TARGET", PHP_APACHE_TARGET);
  160. #endif
  161. if (apv && *apv) {
  162. php_info_print_table_row(2, "Apache Version", apv);
  163. }
  164. #ifdef APACHE_RELEASE
  165. snprintf(output_buf, sizeof(output_buf), "%d", APACHE_RELEASE);
  166. php_info_print_table_row(2, "Apache Release", output_buf);
  167. #endif
  168. snprintf(output_buf, sizeof(output_buf), "%d", MODULE_MAGIC_NUMBER);
  169. php_info_print_table_row(2, "Apache API Version", output_buf);
  170. snprintf(output_buf, sizeof(output_buf), "%s:%u", serv->server_hostname, serv->port);
  171. php_info_print_table_row(2, "Hostname:Port", output_buf);
  172. #if !defined(WIN32) && !defined(WINNT)
  173. snprintf(output_buf, sizeof(output_buf), "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
  174. php_info_print_table_row(2, "User/Group", output_buf);
  175. snprintf(output_buf, sizeof(output_buf), "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
  176. php_info_print_table_row(2, "Max Requests", output_buf);
  177. #endif
  178. snprintf(output_buf, sizeof(output_buf), "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout);
  179. php_info_print_table_row(2, "Timeouts", output_buf);
  180. #if !defined(WIN32) && !defined(WINNT)
  181. /*
  182. This block seems to be working on NetWare; But it seems to be showing
  183. all modules instead of just the loaded ones
  184. */
  185. php_info_print_table_row(2, "Server Root", server_root);
  186. strcpy(modulenames, "");
  187. for(modp = top_module; modp; modp = modp->next) {
  188. strlcpy(name, modp->name, sizeof(name));
  189. if ((p = strrchr(name, '.'))) {
  190. *p='\0'; /* Cut off ugly .c extensions on module names */
  191. }
  192. strlcat(modulenames, name, sizeof(modulenames));
  193. if (modp->next) {
  194. strlcat(modulenames, ", ", sizeof(modulenames));
  195. }
  196. }
  197. php_info_print_table_row(2, "Loaded Modules", modulenames);
  198. #endif
  199. php_info_print_table_end();
  200. DISPLAY_INI_ENTRIES();
  201. {
  202. register int i;
  203. array_header *arr;
  204. table_entry *elts;
  205. request_rec *r;
  206. r = ((request_rec *) SG(server_context));
  207. arr = table_elts(r->subprocess_env);
  208. elts = (table_entry *)arr->elts;
  209. SECTION("Apache Environment");
  210. php_info_print_table_start();
  211. php_info_print_table_header(2, "Variable", "Value");
  212. for (i=0; i < arr->nelts; i++) {
  213. php_info_print_table_row(2, elts[i].key, elts[i].val);
  214. }
  215. php_info_print_table_end();
  216. }
  217. {
  218. array_header *env_arr;
  219. table_entry *env;
  220. int i;
  221. request_rec *r;
  222. r = ((request_rec *) SG(server_context));
  223. SECTION("HTTP Headers Information");
  224. php_info_print_table_start();
  225. php_info_print_table_colspan_header(2, "HTTP Request Headers");
  226. php_info_print_table_row(2, "HTTP Request", r->the_request);
  227. env_arr = table_elts(r->headers_in);
  228. env = (table_entry *)env_arr->elts;
  229. for (i = 0; i < env_arr->nelts; ++i) {
  230. if (env[i].key) {
  231. php_info_print_table_row(2, env[i].key, env[i].val);
  232. }
  233. }
  234. php_info_print_table_colspan_header(2, "HTTP Response Headers");
  235. env_arr = table_elts(r->headers_out);
  236. env = (table_entry *)env_arr->elts;
  237. for(i = 0; i < env_arr->nelts; ++i) {
  238. if (env[i].key) {
  239. php_info_print_table_row(2, env[i].key, env[i].val);
  240. }
  241. }
  242. php_info_print_table_end();
  243. }
  244. }
  245. /* }}} */
  246. /* {{{ proto bool apache_child_terminate(void)
  247. Terminate apache process after this request */
  248. PHP_FUNCTION(apache_child_terminate)
  249. {
  250. #ifndef MULTITHREAD
  251. if (AP(terminate_child)) {
  252. ap_child_terminate( ((request_rec *)SG(server_context)) );
  253. RETURN_TRUE;
  254. } else { /* tell them to get lost! */
  255. php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function is disabled");
  256. RETURN_FALSE;
  257. }
  258. #else
  259. php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function is not supported in this build");
  260. RETURN_FALSE;
  261. #endif
  262. }
  263. /* }}} */
  264. /* {{{ proto string apache_note(string note_name [, string note_value])
  265. Get and set Apache request notes */
  266. PHP_FUNCTION(apache_note)
  267. {
  268. char *note_name, *note_val = NULL;
  269. int note_name_len, note_val_len;
  270. char *old_val;
  271. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &note_name, &note_name_len, &note_val, &note_val_len) == FAILURE) {
  272. return;
  273. }
  274. old_val = (char *) table_get(((request_rec *)SG(server_context))->notes, note_name);
  275. if (note_val) {
  276. table_set(((request_rec *)SG(server_context))->notes, note_name, note_val);
  277. }
  278. if (old_val) {
  279. RETURN_STRING(old_val, 1);
  280. }
  281. RETURN_FALSE;
  282. }
  283. /* }}} */
  284. /* {{{ proto bool virtual(string filename)
  285. Perform an Apache sub-request */
  286. /* This function is equivalent to <!--#include virtual...-->
  287. * in mod_include. It does an Apache sub-request. It is useful
  288. * for including CGI scripts or .shtml files, or anything else
  289. * that you'd parse through Apache (for .phtml files, you'd probably
  290. * want to use <?Include>. This only works when PHP is compiled
  291. * as an Apache module, since it uses the Apache API for doing
  292. * sub requests.
  293. */
  294. PHP_FUNCTION(virtual)
  295. {
  296. char *filename;
  297. int filename_len;
  298. request_rec *rr = NULL;
  299. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
  300. return;
  301. }
  302. if (!(rr = sub_req_lookup_uri (filename, ((request_rec *) SG(server_context))))) {
  303. php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
  304. if (rr)
  305. destroy_sub_req (rr);
  306. RETURN_FALSE;
  307. }
  308. if (rr->status != 200) {
  309. php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - error finding URI", filename);
  310. if (rr)
  311. destroy_sub_req (rr);
  312. RETURN_FALSE;
  313. }
  314. php_output_end_all(TSRMLS_C);
  315. php_header(TSRMLS_C);
  316. if (run_sub_req(rr)) {
  317. php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", filename);
  318. if (rr)
  319. destroy_sub_req (rr);
  320. RETURN_FALSE;
  321. }
  322. if (rr)
  323. destroy_sub_req (rr);
  324. RETURN_TRUE;
  325. }
  326. /* }}} */
  327. /* {{{ proto array getallheaders(void)
  328. Alias for apache_request_headers() */
  329. /* }}} */
  330. /* {{{ proto array apache_request_headers(void)
  331. Fetch all HTTP request headers */
  332. PHP_FUNCTION(apache_request_headers)
  333. {
  334. array_header *env_arr;
  335. table_entry *tenv;
  336. int i;
  337. array_init(return_value);
  338. env_arr = table_elts(((request_rec *) SG(server_context))->headers_in);
  339. tenv = (table_entry *)env_arr->elts;
  340. for (i = 0; i < env_arr->nelts; ++i) {
  341. if (!tenv[i].key) {
  342. continue;
  343. }
  344. if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
  345. RETURN_FALSE;
  346. }
  347. }
  348. }
  349. /* }}} */
  350. /* {{{ proto array apache_response_headers(void)
  351. Fetch all HTTP response headers */
  352. PHP_FUNCTION(apache_response_headers)
  353. {
  354. array_header *env_arr;
  355. table_entry *tenv;
  356. int i;
  357. array_init(return_value);
  358. env_arr = table_elts(((request_rec *) SG(server_context))->headers_out);
  359. tenv = (table_entry *)env_arr->elts;
  360. for (i = 0; i < env_arr->nelts; ++i) {
  361. if (!tenv[i].key) continue;
  362. if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
  363. RETURN_FALSE;
  364. }
  365. }
  366. }
  367. /* }}} */
  368. /* {{{ proto bool apache_setenv(string variable, string value [, bool walk_to_top])
  369. Set an Apache subprocess_env variable */
  370. PHP_FUNCTION(apache_setenv)
  371. {
  372. int var_len, val_len;
  373. zend_bool top=0;
  374. char *var = NULL, *val = NULL;
  375. request_rec *r = (request_rec *) SG(server_context);
  376. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|b", &var, &var_len, &val, &val_len, &top) == FAILURE) {
  377. return;
  378. }
  379. while(top) {
  380. if(r->prev) r = r->prev;
  381. else break;
  382. }
  383. ap_table_setn(r->subprocess_env, ap_pstrndup(r->pool, var, var_len), ap_pstrndup(r->pool, val, val_len));
  384. RETURN_TRUE;
  385. }
  386. /* }}} */
  387. /* {{{ proto object apache_lookup_uri(string URI)
  388. Perform a partial request of the given URI to obtain information about it */
  389. PHP_FUNCTION(apache_lookup_uri)
  390. {
  391. char *filename;
  392. int filename_len;
  393. request_rec *rr=NULL;
  394. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
  395. return;
  396. }
  397. if (!(rr = sub_req_lookup_uri(filename, ((request_rec *) SG(server_context))))) {
  398. php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed '%s'", filename);
  399. RETURN_FALSE;
  400. }
  401. object_init(return_value);
  402. add_property_long(return_value,"status", rr->status);
  403. if (rr->the_request) {
  404. add_property_string(return_value,"the_request", rr->the_request, 1);
  405. }
  406. if (rr->status_line) {
  407. add_property_string(return_value,"status_line", (char *)rr->status_line, 1);
  408. }
  409. if (rr->method) {
  410. add_property_string(return_value,"method", (char *)rr->method, 1);
  411. }
  412. if (rr->content_type) {
  413. add_property_string(return_value,"content_type", (char *)rr->content_type, 1);
  414. }
  415. if (rr->handler) {
  416. add_property_string(return_value,"handler", (char *)rr->handler, 1);
  417. }
  418. if (rr->uri) {
  419. add_property_string(return_value,"uri", rr->uri, 1);
  420. }
  421. if (rr->filename) {
  422. add_property_string(return_value,"filename", rr->filename, 1);
  423. }
  424. if (rr->path_info) {
  425. add_property_string(return_value,"path_info", rr->path_info, 1);
  426. }
  427. if (rr->args) {
  428. add_property_string(return_value,"args", rr->args, 1);
  429. }
  430. if (rr->boundary) {
  431. add_property_string(return_value,"boundary", rr->boundary, 1);
  432. }
  433. add_property_long(return_value,"no_cache", rr->no_cache);
  434. add_property_long(return_value,"no_local_copy", rr->no_local_copy);
  435. add_property_long(return_value,"allowed", rr->allowed);
  436. add_property_long(return_value,"sent_bodyct", rr->sent_bodyct);
  437. add_property_long(return_value,"bytes_sent", rr->bytes_sent);
  438. add_property_long(return_value,"byterange", rr->byterange);
  439. add_property_long(return_value,"clength", rr->clength);
  440. #if MODULE_MAGIC_NUMBER >= 19980324
  441. if (rr->unparsed_uri) {
  442. add_property_string(return_value,"unparsed_uri", rr->unparsed_uri, 1);
  443. }
  444. if(rr->mtime) {
  445. add_property_long(return_value,"mtime", rr->mtime);
  446. }
  447. #endif
  448. if(rr->request_time) {
  449. add_property_long(return_value,"request_time", rr->request_time);
  450. }
  451. destroy_sub_req(rr);
  452. }
  453. /* }}} */
  454. #if 0
  455. /*
  456. This function is most likely a bad idea. Just playing with it for now.
  457. */
  458. PHP_FUNCTION(apache_exec_uri)
  459. {
  460. char *filename;
  461. int filename_len;
  462. request_rec *rr=NULL;
  463. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
  464. return;
  465. }
  466. if(!(rr = ap_sub_req_lookup_uri(filename, ((request_rec *) SG(server_context))))) {
  467. php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed", filename);
  468. RETURN_FALSE;
  469. }
  470. RETVAL_LONG(ap_run_sub_req(rr));
  471. ap_destroy_sub_req(rr);
  472. }
  473. #endif
  474. /* {{{ proto string apache_get_version(void)
  475. Fetch Apache version */
  476. PHP_FUNCTION(apache_get_version)
  477. {
  478. char *apv = (char *) ap_get_server_version();
  479. if (apv && *apv) {
  480. RETURN_STRING(apv, 1);
  481. }
  482. RETURN_FALSE;
  483. }
  484. /* }}} */
  485. /* {{{ proto array apache_get_modules(void)
  486. Get a list of loaded Apache modules */
  487. PHP_FUNCTION(apache_get_modules)
  488. {
  489. int n;
  490. char *p;
  491. array_init(return_value);
  492. for (n = 0; ap_loaded_modules[n]; ++n) {
  493. char *s = (char *) ap_loaded_modules[n]->name;
  494. if ((p = strchr(s, '.'))) {
  495. add_next_index_stringl(return_value, s, (p - s), 1);
  496. } else {
  497. add_next_index_string(return_value, s, 1);
  498. }
  499. }
  500. }
  501. /* }}} */
  502. /* {{{ proto bool apache_reset_timeout(void)
  503. Reset the Apache write timer */
  504. PHP_FUNCTION(apache_reset_timeout)
  505. {
  506. ap_reset_timeout((request_rec *)SG(server_context));
  507. RETURN_TRUE;
  508. }
  509. /* }}} */
  510. /*
  511. * Local variables:
  512. * tab-width: 4
  513. * c-basic-offset: 4
  514. * End:
  515. * vim600: sw=4 ts=4 fdm=marker
  516. * vim<600: sw=4 ts=4
  517. */