Index: ext/standard/php_fopen_wrapper.c
===================================================================
RCS file: /repository/php-src/ext/standard/php_fopen_wrapper.c,v
retrieving revision 1.45.2.4.2.3
diff -u -r1.45.2.4.2.3 php_fopen_wrapper.c
--- ext/standard/php_fopen_wrapper.c	3 Nov 2006 13:34:18 -0000	1.45.2.4.2.3
+++ ext/standard/php_fopen_wrapper.c	4 Nov 2006 20:37:40 -0000
@@ -187,10 +187,22 @@
 	}
 	
 	if (!strcasecmp(path, "input")) {
+    	if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) {
+        	if (options & REPORT_ERRORS) {
+				php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration");
+			}
+			return NULL;
+		}
 		return php_stream_alloc(&php_stream_input_ops, ecalloc(1, sizeof(off_t)), 0, "rb");
-	}  
+	}
 	
 	if (!strcasecmp(path, "stdin")) {
+    	if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) {
+        	if (options & REPORT_ERRORS) {
+				php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration");
+			}
+			return NULL;
+		}
 		if (!strcmp(sapi_module.name, "cli")) {
 			static int cli_in = 0;
 			fd = STDIN_FILENO;
Index: main/streams/memory.c
===================================================================
RCS file: /repository/php-src/main/streams/memory.c,v
retrieving revision 1.8.2.6.2.8
diff -u -r1.8.2.6.2.8 memory.c
--- main/streams/memory.c	29 Jun 2006 14:40:49 -0000	1.8.2.6.2.8
+++ main/streams/memory.c	4 Nov 2006 20:37:40 -0000
@@ -708,7 +708,7 @@
 php_stream_wrapper php_stream_rfc2397_wrapper =	{
 	&php_stream_rfc2397_wops,
 	NULL,
-	0, /* is_url */
+	1, /* is_url */
 };
 
 /*
