Jump to content


Photo

clearstatcache not working?


  • Please log in to reply
No replies to this topic

#1 macworks

macworks
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 September 2006 - 08:27 PM

Okay I'm building a PHP driven document library where users can upload and download documents, create folders, sub-folders, etc.

I discovered that I needed to use clearstatcache to force PHP to actually look at the file system to determine if a file exists or if an item is a directory / folder. But when I remove files from the folder, PHP still thinks that the item is there when I use is_readable or is_dir or file_exists. I even went so far as to upgrade PHP from 5.1.4 to 5.1.6 and I restarted Apache too.

Does anyone have any insight on this?

In case you are wondering, my document library uses a database to store the list of document with some additional meta-data, so when a user visits a doc lib folder, PHP grabs records from the database to see which files are in the directory, then checks the file system to make sure that the files are actually there.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users