Just did a search but there wasn't much. Just your digital point thread came up mainly that had the same question.
How about monitoring the file for changes, either by file size of modification timestamp. Then the last change quickly with php starting from the end of the file. That way the file will only be read when changed and just get the latest change quickly.
Well ive also done this, checked filesize and compared it to a previous filesize to check for changes, but checking for filesize seems to "lock" it aswell.
The scripts needs to check the file every 3 seconds, because a certain trigger opens a popup after a certain action is made. So checking every 10 seconds would eliminate the problem but render the script useless.
If I open the log file in notepadd for editing, the program can still write to the file. Or am I right in thinking the file content will be loaded into mermory and the file is not in use until saving again.
Is it just PHP is locking it? Would a seperate windows app reading the file eliminate the problem?
Think im really stuck.
Thanks for your help so far though. Much appreciated!
I am not intimately familiar with how php reads the files, so I don't know a solution to your problem purely in PHP. This is one of the issues with high level languages; you don't have much control over anything specific.
Your presumption of notepad is correct, it only accesses the file when it needs to. Perhaps you would write a quick app in C to do your bidding with the file and call it via command line.