Nov 21


PHP Warning: fopen(cache/____________.cache): failed to open stream: File name too long in test.php on line 12

Error type: warning


Call to function fopen() fails for some files.


The file system has a limit for the file names, for Linux (ext) is 256 characters, trying to create a file longer than that will fail and issue the warning above.


Shorten the filename to have less than 256 characters. Use hash functions if you can’t just truncate the file name.