PHP SplFileInfo: "Too many open files"
Posted: Fri Mar 10, 2017 2:37 pm
[PROBLEM]
Storing clones of SplFileInfo objects in an array to sort them, throws the following error:
If only I had seen Ken Snyder's comment on PHP DirectoryIterator's documentation page before:
Storing clones of SplFileInfo objects in an array to sort them, throws the following error:
[SOLUTION]failed to open dir: Too many open files in [...]
If only I had seen Ken Snyder's comment on PHP DirectoryIterator's documentation page before:
Don't store DirectoryIterator objects for later; you will get an error saying "too many open files" when you store more than the operating system limit (usually 256 or 1024).