Oct 2, 2005

I have a few php pages that are pretty resource hungry so I've made a script to cache them as static html files. I was then going to have the script modify the .htaccess file to redirect to the html files according to which had an up-to-cache.

Unfortunately, after writing the whole caching script I realised I could not edit the .htaccess file because PHP was running as nobody. I tried changing the permission on .htaccess as a temporary solution, but they kept changing back. I suppose I'll have to look into using phpsuexec. But my question is:

What causes the .htaccess permissions to change back? Can I prevent this behaviour?

Also, if anyone has any suggestions as to how I might get the caching script working without using phpsuexec, I'd be glad to hear.