2
+----------------------------------------------------------------------+
4
+----------------------------------------------------------------------+
5
| Copyright (c) 1997-2004 The PHP Group |
6
+----------------------------------------------------------------------+
7
| This source file is subject to version 3.0 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_0.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@php.net> |
16
| (with helpful hints from Dean Gaudet <dgaudet@arctic.org> |
17
| PHP 4.0 patches by: |
18
| Zeev Suraski <zeev@zend.com> |
19
| Stig Bakken <ssb@php.net> |
20
+----------------------------------------------------------------------+
22
/* $Id: sapi_apache.c,v 1.45 2004/01/08 08:18:03 andi Exp $ */
24
#include "php_apache_http.h"
26
/* {{{ apache_php_module_main
28
int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC)
31
zend_file_handle file_handle;
33
if (php_request_startup(TSRMLS_C) == FAILURE) {
36
/* sending a file handle to another dll is not working
37
// so let zend open it.
40
if (display_source_mode) {
41
zend_syntax_highlighter_ini syntax_highlighter_ini;
43
php_get_highlight_struct(&syntax_highlighter_ini);
44
if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC) != SUCCESS) {
48
file_handle.type = ZEND_HANDLE_FILENAME;
49
file_handle.handle.fd = 0;
50
file_handle.filename = SG(request_info).path_translated;
51
file_handle.opened_path = NULL;
52
file_handle.free_filename = 0;
54
(void) php_execute_script(&file_handle TSRMLS_CC);
60
php_request_shutdown(NULL);
72
* vim600: sw=4 ts=4 fdm=marker