Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46995 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30989 invoked from network); 15 Feb 2010 20:37:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2010 20:37:48 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.219 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.219.219 mail-ew0-f219.google.com Received: from [209.85.219.219] ([209.85.219.219:41615] helo=mail-ew0-f219.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/A3-08117-A90B97B4 for ; Mon, 15 Feb 2010 15:37:47 -0500 Received: by ewy19 with SMTP id 19so3579219ewy.1 for ; Mon, 15 Feb 2010 12:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hQlbaSUm6NwYT1Xv0dfIS0FXAp0+otJVFUva2QUfmJM=; b=AsMUS65kNGuAA2rUNm09DvX9yeDOblBiSJHd3PycQ0zlMvxwyRf1zkf/3EWRAZb8qu 57yalhlq52EZMHVUfDHZXb8fw0XsXxacqOib4ym3VD3sfkTh9aTgyqvbn4RXq1PoOJVm SxTIaqLEWCcGJ7lD3I2Hurn3YtXNm0+R0wO6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=WISQlLYS0AJ8pgk60g9GDoqW77O6njAjzFzHzbsV0CIRxJ2Wmdg5y7GNuHwyGA6lOZ nrzlVKLloYwWuDheHJyngVdZF7z4NbUhpeLWDO+hFTNT/rJQvttC19UJqWNmBzYDBD7o sjHFuG+Z2VKSeP7KorBoOjVnpgrdB4aPGy7IM= MIME-Version: 1.0 Received: by 10.216.85.80 with SMTP id t58mr2076533wee.168.1266266263327; Mon, 15 Feb 2010 12:37:43 -0800 (PST) In-Reply-To: <4B79A085.4020304@kukulich.cz> References: <16.63.50402.0BF397B4@pb1.pair.com> <4B79A085.4020304@kukulich.cz> Date: Mon, 15 Feb 2010 21:37:43 +0100 Message-ID: To: Jaroslav Hanslik Cc: Ferenc Kovacs , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Bug #50751 From: pierre.php@gmail.com (Pierre Joye) hi, I was wondering if it worked before when "file:///somet/path" was used or if it did not, should we support it, to be consistent with what your patch allows (with tcp, but I can imagine other protocols at some point). Cheers, 2010/2/15 Jaroslav Hanslik : > I don't think it's supposed to work with file://. I get the same error. > > I know 4 types of session handlers: > > 1) files - save_path should be file system path > 2) user - save_path could be anything > 3) memcache - save_path uses format tcp://host:port > (http://cz.php.net/manual/en/memcache.ini.php#ini.memcache.save-path) > 4) memcached - uses format hostname:port > (http://cz.php.net/manual/en/memcached.sessions.php) > > So I think that save_path should be treated as file system path only if t= he > handler is "files". And that is what the patch does. > > Test script: > > > ini_set('open_basedir', 'C:/'); > ini_set('session.save_handler', 'memcache'); > session_save_path('tcp://localhost:11211'); > > ?> > > Without patch: > > Warning: session_save_path(): open_basedir restriction in effect. > File(tcp://localhost:11211) is not within the allowed path(s): (C:/) in > C:\bug.php on line 5 > > With patch: > > No warning and session works. > > > Jaroslav Hanslik > > > Dne 15.2.2010 16:44, Pierre Joye napsal(a): >> >> hi, >> >> Is it supposed to work with file:// URI as well? If yes, the patch may >> break this feature. >> >> It would be also nice to add a test case if possible. >> >> Cheers, >> >> On Mon, Feb 15, 2010 at 4:28 PM, Ferenc Kovacs =A0wrot= e: >>> >>> If this is an expected behavior then I think it should be noted here: >>> http://www.php.net/manual/en/transports.inet.php >>> >>> Tyrael >>> >>> 2010/2/15 Jaroslav Hanslik: >>>> >>>> Hi, >>>> >>>> my bug report http://bugs.php.net/bug.php?id=3D50751 was marked as bog= us >>>> but I >>>> still think it's a bug. The session.save_path is treated as file syste= m >>>> path >>>> even if I use memcache as session.save_handler. Here is my patch >>>> http://temp.kukulich.cz/session_save_path_checked_only_if_files.txt >>>> (against >>>> PHP 5.3.1). Maybe it would be clearer what I mean. If I'm wrong, pleas= e >>>> someone expain me why. >>>> >>>> Jaroslav Hanslik >>>> >>>> -- >>>> PHP Internals - PHP Runtime Development Mailing List >>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >>>> >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> >> > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org