Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42665 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90547 invoked from network); 16 Jan 2009 17:42:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2009 17:42:31 -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.157 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.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:36345] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/0D-27029-607C0794 for ; Fri, 16 Jan 2009 12:42:31 -0500 Received: by fg-out-1718.google.com with SMTP id 16so764938fgg.23 for ; Fri, 16 Jan 2009 09:42:28 -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=SkaZbZBn/0/IA2HzE8Scuaxln7C8xS/Spyfz7hU1Cgo=; b=klTPRn4vmTagFvZXpjbYoit48iA4dCEZHel82SKu/5SbHdxsHeMGxMme0WeFbPAOKI zYKPomup/CTaY8tID18xnql5Zn6/ZEfvNuk5V3BjzjoSl1X9to8unhT+qED3qEGltHos I3O1NH5dcCXtwMZTaz1YBid3BdJ3z50EaoXMA= 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=ZhWbtu8k1LPBk6wU2z41E9ROS31YkSDbKMeRkayg+y11NU4/d4LrkJuswA2y5PgpWx 5V+Dz4DZDCbic/h0R01PFz31Hz37QGywQdb45XOSXFSRjmw52Ixl8xG3J0P3ZyRfmYsL X1xRmHPoFV8hp4gynxMk5Fcve72cwQ0f+v+Lw= MIME-Version: 1.0 Received: by 10.86.72.3 with SMTP id u3mr1162387fga.1.1232127748412; Fri, 16 Jan 2009 09:42:28 -0800 (PST) In-Reply-To: References: <8C.85.27029.97F90794@pb1.pair.com> Date: Fri, 16 Jan 2009 18:42:28 +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 6:27 PM, Karsten Dambekalns wrote: > Oe example with 229 characters: > /Users/karsten/Sites/typo3v5/Data/Temporary/6e7991cd3e3f10e110df4a26825c1f8c/_www/Cache/Testing/Tags/%CLASS%F3_Widget_Persistence_MessageQueuePersistenceAspect/FLOW3_Reflection-F3_Widget_Persistence_MessageQueuePersistenceAspect > > For deeper nested namespaces this will get longer, add some deeper directory > structure at the start and - bang. With such naming, you are likely to hit this issue anyway, no matter the OS. Think about one having his host directories in deeper level, for example, or the hostnames use some lengthy values/names? > Now, I never ran into problems with paths being too long for anything I > tried on Linux or Mac, so what limits exist? Admittedly I never thought > about that much. Given we live in a world of terabytes I'd expect names to > be virtually as long as I want. :) It is system dependent and there is many values. >> Btw, what do you do when the path len of the path where the cache is >> stored is closed from MAXPATHLEN (PHP_MAXPATHLEN in userland)? Given >> than MAXPATHLEN can be between 260 and 2048 (~), that' can happen >> easily. > > Never heard of that constant, thanks for pointing it out. The documentation > doesn't explain it, is there some background information available > somewhere? it reflects the internal constant MAXPATHLEN, which is defined at compile time (per os/system). > So, in the best case we hit the roof at ~2k? Good to know... Keep in mind that the _complete_ path has to fit in there, not only the last part (your cache name). I think you should rethink a bit the naming of your caching system, that'll save you some troubles soon later. About the 260 limit on windows, we may find an efficitent solution to increase it in a safe way, but I don't have one at hand right now. I have to think more about that and see what can be done for 5.3 (which supports XP+ only, which means NTFS in the most cases). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org