In order to modify the file it needs to have 777 as its permissions.
I'm thinking by default I could make the file 775 and inside my PHP script I could breifly CHMOD the file to 777, write my changes and CHMOD back to 775 - with file locking of course.
Can anyone see any problems with this solution? I know there are better ways of solving the issue (storing in a database or outside of docroot) but my circumstances don't allow it. The file *must* reside in docroot alongside the index.php script and PHP cannot be switched to run as suexec - it's an Apache module...
Comments?