Topic: Unable to write updates cache file to cache directory.

Whenever I try to login, I get the following error message:
An error was encountered

Unable to write updates cache file to cache directory. Please make sure PHP has write access to the directory 'cache'.

The error occurred on line 52 in /home/echolynx/public_html/nphsbookclub.com/forum/include/cache.php(343) : eval()'d code

Though you can still the rest of the forum - until you try to log in. Then you get this message on every page. If you close the window, go to the nphsbookclub.com website then click on forums, you can see the pages again. But if you try and just go to nphsbookclub.com/forum you get the error message.

I have no idea what could be wrong. I did have some issues with another CMS before and had to restore the entire /nphsbookclub.com/ folder from a backup made prior to the problem, but I haven't noticed problems with the forums till now. I would rather not have a clean reinstall done, but that may be the only other solution.

I am running PunBB version 1.3.2 on a MySQL database. (Would like it in a SQLite install, but I haven't the faintest clue on how to do that. I've never used SQLite before.)

-Ian

Re: Unable to write updates cache file to cache directory.

In order for PunBB to function properly, the directory named <em>cache</em> must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.

Re: Unable to write updates cache file to cache directory.

Isn't anything with permissions set on 777 a security risk?

Re: Unable to write updates cache file to cache directory.

Usually no, but depends on your hosting.

5 (edited by EchoLynx 2009-11-10 11:17)

Re: Unable to write updates cache file to cache directory.

Parpalak wrote:

Usually no, but depends on your hosting.

When would it be a risk? The Wordpress Codex says otherwise...

Re: Unable to write updates cache file to cache directory.

For example, this could happen on a virtual hosting when all scripts are running under one user and someone has a site on the same server as you and he knows your login.

Please, ask your hosting support ("I want to install PunBB, but it writes executable PHP scripts into a directory with 777 permissions. Are there any security issues?").

Re: Unable to write updates cache file to cache directory.

Parpalak wrote:

For example, this could happen on a virtual hosting when all scripts are running under one user and someone has a site on the same server as you and he knows your login.

Please, ask your hosting support ("I want to install PunBB, but it writes executable PHP scripts into a directory with 777 permissions. Are there any security issues?").

Okay, I will post back when I get a reply.

Re: Unable to write updates cache file to cache directory.

Here's the reply I received:

Hi,

777 for a directory is ok, the biggest risk is having a settings file with 777 permissions as that means hackers could potentially read your database and other settings if they were motivated to do so. On a directory it should be fine. The 777 permission is very common for CMS's or BBS's etc as they need to write files to function. We have considered running PHP another way which changes that whole scenario, but it has it's own flaws. It's always a balance with web hosting as you have to allow everyone to see and use the site. Let me know if you have any questions.

Cheers,
Chad

So that puts Taproot Webhosting in the green as of 12NOV2009.

Re: Unable to write updates cache file to cache directory.

As far as I know, there are no files with 777 permissions in PunBB. So, everything is ok.