|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-31 13:02 UTC] whistl0r+phpbug at googlemail dot com
[2009-04-21 02:54 UTC] fa@php.net
[2009-04-21 05:31 UTC] whistl0r+phpbug at googlemail dot com
[2020-02-07 06:10 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 14:00:01 2025 UTC |
Description: ------------ I wanted to check, how tempnam() handles file system limits. On NTFS, just 65535 files per directory are allowed. Reproduce code: --------------- <?php // Keep script alive ignore_user_abort(1); @set_time_limit(0); $dir = 'C:\Test'; (if (!file_exists($dir)) { // Create Test directory mkdir($dir, null, true); } $i = 0; while (tempnam($dir, 'Foobar')) { $i++; } printf('%u files created', $i); Expected result: ---------------- The script should stop, because tempnam() should return "false". The function should return "false", because when 65535 files are in the specified directory, you reached a limit and aren't able to write to C:\Test anymore. Actual result: -------------- The script will keep running. After the 65535. file is created in C:\Test, the function will ignore the specified directory and switch to %temp% (which is usually C:\Windows\Temp).