Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32038 invoked from network); 16 Jan 2009 13:34:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2009 13:34:01 -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 72.14.220.158 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: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:61656] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/E1-27029-8CC80794 for ; Fri, 16 Jan 2009 08:34:00 -0500 Received: by fg-out-1718.google.com with SMTP id 16so714994fgg.23 for ; Fri, 16 Jan 2009 05:33:57 -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=pJj6YUjUkChTQENkiVv755xfLPKkvAvVpgiyhlzHkRQ=; b=pOsXLSzrwv0bpUgKVNXwbigxFjcNJsb0FysJkQxY12BcxbIbhqwoUc0qTi1d4TTGOu lRIvSh5LlQfb0z/kIPVBkb8v7LcYEaEx0oNBaVwACoc/TAx5E0w9/sJ9U5Sq0I5zfZQu dLUKBx0vbOgWrWhmFwWCmPUHJS1kqGIG/Y6CA= 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=FEIw5YmDjoMjw6bRyHL7OvJjJhAMo6v/P4hUmdIFS/z2ZxAaOk3QcMQMviqHVncAyV ebn44VXE6NvBYPKHTG376UQLJOPBZQYJSkpBhSdSDlKkb0GNAk7qqUjRsvHWADN+KDVw V78AQNOgj9VliRihGF7/1mPUnSYS1Y5shgk2U= MIME-Version: 1.0 Received: by 10.86.92.4 with SMTP id p4mr2000476fgb.36.1232112837613; Fri, 16 Jan 2009 05:33:57 -0800 (PST) In-Reply-To: References: Date: Fri, 16 Jan 2009 14:33:57 +0100 Message-ID: To: Karsten Dambekalns Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Path length for files on NTFS From: pierre.php@gmail.com (Pierre Joye) hi, On Fri, Jan 16, 2009 at 11:42 AM, Karsten Dambekalns wrote: > Recently someone using our software told us about problems with generated > filenames being too long. I did some research on the net and some quick > tests on Vista Business, and it seems there is indeed still a problem. > > While NTFS supports path lengths of up to 32k characters, By the way, this limit is approximative. > "most software" > still supports only 255 (or 260 on Vista) character filenames. Since that > includes the full path, we run into this problem with file based caching > filenames. > > Since there are ways to use long(er) filenames, does anyone know if this > planned for PHP? Should it work? Is this a problem others also see? There is no plan yet to increase this value. The main problem is that the maximum length of a path is volume dependent, not system dependent. To support longer path, it would mean to check the volume information for each file operation (once per volume, cache it and reuse it) as well as using dymamic allocation for for the filename itself, in many places. I'm not sure it is worth the effort. You can use a hash as filename, as a temporary workaround. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org