Joomla Forum

Joomla Hacks => Joomla-SMF 2.0.x => Topic started by: Teodor Andrei on December 14, 2006, 04:45:53 PM



Title: Cache problem
Post by: Teodor Andrei on December 14, 2006, 04:45:53 PM
Hello

Sometime, this error appear:

Warning: opendir(/home/xxxxx/public_html/administrator/components/com_smf/cache/db/cache_d/) [function.opendir]: failed to open dir: Permission denied in /home/xxxxx/public_html/administrator/components/com_smf/includes/Lite.php on line 611

Line 611 is:

  if (!($dh = opendir($dir))) {
            return $this->raiseError('JSMF_Cache_Lite : Unable to open cache directory !', -4);
        }
.....

Cache and db folders are set to 777

Any ideea what to do?

Thanks


Title: Re: Cache problem
Post by: Janko on December 31, 2006, 09:44:48 AM
i have the same problems and no ideas  ???


Title: Re: Cache problem
Post by: -Wolverine on December 31, 2006, 11:58:49 AM
is it possible your webhost, like so many, run processes that change owner of all files?  If this is the case then it is possible that the owner of the cache files, which is the php process, is no longer the owner of the files, i.e. the webhost sets the file to be owned by your ftp user.  Since the cache files are restricted to disallow access by anyone other than the php process, a simple change to owner would render them unreadable and permission denied errors would occur.


Title: Re: Cache problem
Post by: Janko on December 31, 2006, 12:08:30 PM
the server is my own root. i have it test with the apache user and with the ftp user. the problem is again  ??? :(

sorry for my bad englisch i hope you understand me ;)



Title: Re: Cache problem
Post by: -Wolverine on December 31, 2006, 12:33:33 PM
this is a localhost machine, meaning your own computer?


Title: Re: Cache problem
Post by: Janko on December 31, 2006, 01:19:47 PM
this is my own server hostet in a technology park
iám the admin from this box  ;D

this is not my computer at home.

but back to topic... have you any solutions for this problem ?


Title: Re: Cache problem
Post by: -Wolverine on December 31, 2006, 02:26:25 PM
the problem is that your php process does not have permission to write to those directories.  The solution is for you to configure your webserver to allow that.


Title: Re: Cache problem
Post by: Janko on December 31, 2006, 05:13:14 PM
the problem is that your php process does not have permission to write to those directories.  The solution is for you to configure your webserver to allow that.

ahh thanks a lot ;) i hope that works.

i wisch you a happy new year


Title: Re: Cache problem
Post by: Dionysus on February 13, 2007, 05:47:11 PM
Hi There,

I'm on
joomla 1.0.12
SMF 1.1.1
com_smf 2.0.2

I have made sure the cache and db was writable.
I have cleared all cache in the db. But i am still getting these errors intermittently.

Warning: opendir(/home/dionysus/public_html/administrator/components/com_smf/cache/db/cache_5/) [function.opendir]: failed to open dir: Permission denied in /home/dionysus/public_html/administrator/components/com_smf/includes/Lite.php on line 611

Warning: opendir(/home/XXXXXXXX/public_html/administrator/components/com_smf/cache/db/cache_c/) [function.opendir]: failed to open dir: Permission denied in /home/XXXXXXXX/public_html/administrator/components/com_smf/includes/Lite.php on line 611

Warning: opendir(/home/XXXXXXXX/public_html/administrator/components/com_smf/cache/db/cache_9/) [function.opendir]: failed to open dir: Permission denied in /home/XXXXXXXX/public_html/administrator/components/com_smf/includes/Lite.php on line 611



Title: Re: Cache problem
Post by: -Wolverine on February 13, 2007, 05:50:07 PM
this can only happen if you are manually changing permissions or your host is changing ownership of files.  The process that creates those directories is the same process trying to read them.  If they permissions have changed that is why you get the error message.


Title: Re: Cache problem
Post by: Dionysus on February 13, 2007, 08:13:45 PM
Thanks for the reply.

Do I have to e-mail my webhost tech support for this?

Or what is the solution?

Thank you!!


Title: Re: Cache problem
Post by: -Wolverine on February 13, 2007, 10:13:46 PM
you can change the owner of the files back to the same username that php runs as.


Title: Re: Cache problem
Post by: Dionysus on February 14, 2007, 01:49:37 PM
Thank you very much..

Just e-mail my webhost


Title: Re: Cache problem
Post by: Dionysus on February 14, 2007, 02:25:29 PM
My Webhost response:

Ownership changed to nobody on all folders in the cache/db directory. Looks like that's what their solution suggests.


Would this do the trick??? Since this happens intermittently, i can't easily duplicate the error


Title: Re: Cache problem
Post by: -Wolverine on February 18, 2007, 10:12:13 AM
I'm not sure you understood me.  These files are created by the php process and should never be changed.  I think the problem you are having is that they were changed.  Is that what your webhost is saying?  Are they saying that they changed the file ownership?


Title: Re: Cache problem
Post by: Luc Jansen on May 22, 2007, 09:23:40 AM
I had the same problems after my webhost updated the server. Clearing all caches in the Joomla backed solved my problem.


Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com