Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13927 invoked by uid 1010); 26 Oct 2004 20:23:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13901 invoked from network); 26 Oct 2004 20:23:03 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.242) by pb1.pair.com with SMTP; 26 Oct 2004 20:23:03 -0000 Received: by mproxy.gmail.com with SMTP id u52so109233cwc for ; Tue, 26 Oct 2004 13:23:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=IHIg9n9uo5dKziqDIrAGAVZV2k5DH+S3y69T8vHjuP6dNpJPgqZxlAy//3OAD6b1G5McFjKpCXAsTLp6AjhCmoUXL5y35yEH5BRhwgmGiuey790TgNc6nwwQf1woBI5niJQfxgIfqZY5qK8WxVZ3rztzr/F9dLGw2lRTMn5d+lU= Received: by 10.11.117.42 with SMTP id p42mr957457cwc; Tue, 26 Oct 2004 13:23:02 -0700 (PDT) Received: by 10.11.117.13 with HTTP; Tue, 26 Oct 2004 13:23:02 -0700 (PDT) Message-ID: <4e89b4260410261323dc4d6da@mail.gmail.com> Date: Tue, 26 Oct 2004 21:23:02 +0100 Reply-To: Wez Furlong To: Rob Richards Cc: Christian Schneider , internals@lists.php.net In-Reply-To: <078e01c4bb96$86a0f340$f7dea8c0@cyberware.local> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <064a01c4bb82$8f9d4d90$f7dea8c0@cyberware.local> <417E929B.2040301@cschneid.com> <078e01c4bb96$86a0f340$f7dea8c0@cyberware.local> Subject: Re: [PHP-DEV] Re: streams file uri under windows From: kingwez@gmail.com (Wez Furlong) The problem with file:// is that the spec deliberately does not define exactly how file://remotehost/.... works. Should file://\\\\remotehost\\share should work ? I guess it is roughly equivalent to file:///fully/qualified/path, in which case it should work. --Wez. On Tue, 26 Oct 2004 16:01:04 -0400, Rob Richards wrote: > After playing around with it some more, is this that check even needed for > windows to check for remote host access? > What is the different then between doing?: > > file_get_contents("\\\\remotehost\\share\\file.txt"); > > file_get_contents("file://\\\\remotehost\\share\\file.txt"); > > With the current streams code, the first one loads fine, while the 2nd one > fails with a "remote host file access not supported" error. > By removing the check, the second one loads fine as well. > > Is there some other reason the remote host access check is done when called > using file:// syntax (under windows that is)? > > Rob > > From: Christian Schneider > > > > > I'm not an export on that piece of code but passing file:// to this > > function could cause problems. > > You should at least move the path[n+3] != '/' to before the n+4 test and > > I think you should also make sure that n+3 is not '\0' as otherwise n+4 > > could be beyond the end of the string, no? > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >