Topic: cache_config.php problem

I installed PunBB, however when I try to go to the Forum index page, I get a blank page. When I look at the httpd error_log, I see the following messages.
[Tue Feb 20 16:21:08 2007] [error] [client ::1] PHP Warning:  require(./cache/cache_config.php) [<a href='function.require'>function.require</a>]: failed to open stream: Permission denied in /www/html/Forum/include/common.php on line 101
[Tue Feb 20 16:21:08 2007] [error] [client ::1] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required './cache/cache_config.php' (include_path='.:/usr/share/pear') in /www/html/Forum/include/common.php on line 101

Permissions set to 755 for cache directory and the cache_config.php file. (I have also tried to set the permissions to 777 but nothing changed)

Directory and files are owned by the apache user.
can anybody give me an idea on where to look at?
thanks,

2

Re: cache_config.php problem

I believe this is not about permissions.

Are you sure cache directory is in the root directory of punbb forum? Because when you run your site common.php   look for cache_config.php in cache folder which is in root directory of punbb. If it cant find that file in that directory it gives this error.

So common.php looked at your  /cache/ directory and it couldnt find the cache_config.php than it looked at /usr/share/pear directory and it couldnt find it either.

You should check your directories on right places .

If you are Turkish Volkan we can find a solution for this in PunBB Turkish forums. (nickname is Turkish)

http://www.langturk.com/forum/viewforum.php?id=5

Re: cache_config.php problem

If I am not mistaken "cache_config.php" file is created after the installation by PunBB. Since it is under "/Forum/cache", I presume no directory problem (root directory for PunBB is "Forum"). (If I remove the cache folder, PunBB reports an error "File: /www/html/Forum/include/cache.php line: 91 PunBB reported: Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory 'cache') So it doesn't look like a directory problem.
Anyways, cache_config.php file is created with permissions 644. Might that have anything to tell on the nature of the problem?
thanks,

4

Re: cache_config.php problem

are you sure the account you use (apache user) on host or server has write access to cache directory?

Re: cache_config.php problem

I have a problem with SELinux settings. When I disable the SELinux, I am able to see the Forum index php. What is the mechanism used to upload the files to web space?

Re: cache_config.php problem

volkan wrote:

I have a problem with SELinux settings. When I disable the SELinux, I am able to see the Forum index php. What is the mechanism used to upload the files to web space?

The cache files aren't uploaded, they're written by PHP

Re: cache_config.php problem

Yes, I understand that. What I was trying to ask is how do you move/copy the original files (not the cache_config.php) to the web folder?
I am not sure about this but I guess the cache files use the SELinux settings of the php files writing them. Therefore, SELinux settings of the writing file determines the SELinux settings of the cache_config.php file.
Anyways, I changed the SELinux settings of the Forum folder and the files in it using the "chcon" command. It seems to solve my problem.

Re: cache_config.php problem

Yes, I understand that. What I was trying to ask is how do you move/copy the original files (not the cache_config.php) to the web folder?

However you do it: most likely, you uploaded them