2009/1/16 Pierre Joye <pierre....@gmail.com>: > hi > > On Fri, Jan 16, 2009 at 6:27 PM, Karsten Dambekalns <kars...@typo3.org> 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).
As of 5.3, the MAXPATHLEN constant is available in userland as PHP_MAXPATHLEN btw (without having read the whole thread) :) > >> 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Kalle Sommer Nielsen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php