Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

auto generate .htaccess file

Discussion in 'General Discussion' started by JoelP, Nov 26, 2006.

  1. JoelP

    JoelP Member

    Oct 2, 2005
    Likes Received:
    Trophy Points:

    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.


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice