I've had success with Sysinternals Process Explorer. With this, you can search to find what process(es) have a file open, and you can use it to close the handle(s) if you want. Of course, it is safer to close the whole process. Exercise caution and judgement.
To find a specific file, use the menu option Find->Find Handle or DLL...
Type in part of the path to the file. The list of processes will appear below.
If you prefer command line, Sysinternals suite includes command line tool Handle, that lists open handles.
Examples
c:\Program Files\SysinternalsSuite>handle.exe |findstr /i "e:\"
(finds all files opened from drive e:\
"
c:\Program Files\SysinternalsSuite>handle.exe |findstr /i "file-or-path-in-question"
The short answer is options can generally be left at the defaults, which you can take to be the "proper" answers.
The first option (--enable-apc-filehits) enables gathering information for the "filehits" option of apc_cache_info
. Basically, you can use it to figure out which files are pulled from the cache for each request if you're debugging cache-related problems. From the apc_cache_info
documentation:
If cache_type is "filehits", information about which files have been served from the bytecode cache for the current request will be returned. This feature must be enabled at compile time using --enable-filehits.
When it comes to the second option (--enable-apc-spinlocks), spinlocks are a processor-cycle inefficient way of ensuring only one process accesses a resource at any given time. APC uses locks when dealing with shared memory. APC places the cache in shared memory so that all the PHP processes can, well, share the cache, and locks ensure that the processes don't trip over each other while doing it.
As of APC 3.1.9, the PECL installer ask about enabling three additional options: memory protection, pthread read/write locks and pthread mutexes, which correspond to --enable-apc-memprotect, --enable-apc-pthreadrwlocks and --enable-apc-pthreadmutex. The first two are labeled experimental and disabled by default; the latter is enabled.
Memory protection treats some areas of shared memory as read-only in certain circumstances.
Pthread read/write locks and mutexes are alternate locking mechanisms. The locking mechanisms that APC can currently use are:
- file locking (fcntl)
- semaphores
- pthread locks
- pthread mutexes
- Slim reader/writer locks (Windows only)
- spinlocks
Stick to the default locking mechanism unless APC won't compile. Brian Shire at Facebook tested locking mechanism performance and presented the results back in 2007; you can use his results to guide you when trying locking mechanisms when the defaults fail.
Best Answer
i finally managed to install apc with the help from here. i installed on IIS7
added to end of
php.ini
tho i got no idea what the configuration does