char *sapi_apache_read_cookies(SLS_D);
int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers SLS_DC);
int sapi_apache_send_headers(sapi_headers_struct *sapi_headers SLS_DC);
-int send_php(request_rec *r, int display_source_mode, char *filename);
-int send_parsed_php(request_rec * r);
-int send_parsed_php_source(request_rec * r);
+static int send_php(request_rec *r, int display_source_mode, char *filename);
+static int send_parsed_php(request_rec * r);
+static int send_parsed_php_source(request_rec * r);
int php_xbithack_handler(request_rec * r);
void php_init_handler(server_rec *s, pool *p);
return mimetype;
}
-int send_php(request_rec *r, int display_source_mode, char *filename)
+static int send_php(request_rec *r, int display_source_mode, char *filename)
{
int retval;
HashTable *per_dir_conf;
PLS_FETCH();
APLS_FETCH();
+ if (r->assbackwards && r->protocol && !strcmp(r->protocol, "INCLUDED")) {
+ zend_file_handle fh;
+
+ fh.filename = r->filename;
+ fh.opened_path = NULL;
+ fh.free_filename = 0;
+ fh.type = ZEND_HANDLE_FILENAME;
+ zend_execute_scripts(ZEND_INCLUDE CLS_CC ELS_CC, 1, &fh);
+ return OK;
+ }
+
if (setjmp(EG(bailout))!=0) {
return OK;
}
}
-int send_parsed_php(request_rec * r)
+static int send_parsed_php(request_rec * r)
{
return send_php(r, 0, NULL);
}
-int send_parsed_php_source(request_rec * r)
+static int send_parsed_php_source(request_rec * r)
{
return send_php(r, 1, NULL);
}
RETURN_FALSE;
}
- /* Cannot include another PHP file because of global conflicts */
- if (rr->content_type &&
- !strcmp(rr->content_type, PHP_MIME_TYPE)) {
- php_error(E_WARNING, "Cannot include a PHP file "
- "(use <code><?include \"%s\"></code> instead)", (*filename)->value.str.val);
- if (rr) destroy_sub_req (rr);
- RETURN_FALSE;
- }
-
php_end_ob_buffers(1);
php_header();