in reply to permissions and apache

Write a little cron job that looks for a flag somewhere and then regenerates your site. You can store the flag in a database, a DBM file, or a temporary file in a directory that you make writable. I'm leery of changing write permissions, especially to 777.