Page 1 of 1

Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file.php

Posted: Mon Aug 21, 2017 10:59 am
by phinq1910
Hi,
I am using Opencart 3.0.2.0 with Apache 2.4.25/ PHP 5.6.30 on localhost Windows 10. But there is a warning following:

Code: Select all

Warning: unlink(D:/Apache24/htdocs/oc3020b/system/storage/cache/cache.catalog.language.1503287453): Permission denied in D:\Apache24\htdocs\oc3020b\system\library\cache\file.php on line 68
- Try delete cache in D:\Apache24\htdocs\oc3020b\system\storage\cache\ but still have warning.
- Try delete D:\Apache24\htdocs\oc3020b\system\storage\logs\error.log, refresh page again in frist time have not warning, but after it still display warning
Is that bug? Please help

Thanks

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Sun Oct 01, 2017 9:26 pm
by straightlight
Ensure that your system/storage/cache folder is writable. CHMOD 755 would normally suffice. This is not a bug with Opencart.

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Mon Oct 02, 2017 8:23 am
by straightlight
Update: I was able to reproduce the issue.

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Fri Nov 17, 2017 11:41 pm
by gadevitc95
You should grant full permissions to the file.php directory to be able to work

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Sat Nov 18, 2017 3:06 am
by straightlight
Right - about this issue, followed is a bug fix solution: https://github.com/opencart/opencart/bl ... e/file.php

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Thu Nov 23, 2017 5:23 pm
by phinq1910
Thanks sir

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Sat Feb 03, 2018 7:37 pm
by jed clampit
what do you do with the above bug fix solution
do i just replace the file ?

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Sat Feb 03, 2018 10:55 pm
by straightlight
jed clampit wrote:
Sat Feb 03, 2018 7:37 pm
what do you do with the above bug fix solution
do i just replace the file ?
Yes

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Sun May 13, 2018 9:41 am
by cshankga
Worked perfectly. Thank you!

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Tue Jun 26, 2018 11:28 pm
by frtyaman
Worked perfectly. Thank you!

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Wed Aug 15, 2018 1:50 pm
by motion2082
Awesome thanks for sharing a fix, had the same issue with my opencart 3.0.2.0

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Wed Oct 03, 2018 1:15 am
by godly75
Hm, not here, I replaced file.php but still have the error...

Code: Select all

Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.catalog.language.1538504061): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 38Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 39Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 40Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 41Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 42Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 43Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.currency.1538504061): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 38Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 39Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 40Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 41Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 42Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 43Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.catalog.language.1538504061): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 38Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 39Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 40Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 41Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 42Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 43Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.currency.1538504061): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 38Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 39Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 40Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 41Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 42Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 43

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Wed Oct 03, 2018 4:04 am
by straightlight
In catalog/model/localisation/language.php file,

find:

Code: Select all

$language_data = $this->cache->get('language');
replace with:

Code: Select all

$language_data = $this->cache->get('catalog.language');

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Wed May 22, 2019 7:11 am
by MasterCATZ
Thanks , it is 2019 why isn't that typo still fixed in Version 3.0.2.0 ?


*edit* hmm interesting I only pulled from https://github.com/opencart/opencart a few weeks ago

what is the best way to upgrade 3.0.2.0 with a newer 3.0.2.0 ?

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Wed May 22, 2019 8:10 am
by IP_CAM
Well, OpenCart never updates former Versions of OpenCart,
except in a real seldom Emergency Case.
That's why OC frequently changes Version Numbers, and later
Versions most likely then contain those fixed Sections as well.
It's an ongoing development, and one reason, why no FINAL
official OC version ever exists, just a LATEST ... :D
But the fix would be available, among others, in an inofficial
full OC 3.0.2.0 package, to have most all found misses fixed:
https://github.com/condor2/Opencart_3020

One just needs to understand the OC Way of doing Things, it keeps one
from complaining about matters, not beeing part of the OC concept.

Ernie

Re: Warning: unlink(../system/storage/cache/cache.catalog.language.xxx): Permission denied in \system\library\cache\file

Posted: Thu May 23, 2019 6:14 am
by straightlight
Thanks , it is 2019 why isn't that typo still fixed in Version 3.0.2.0 ?
Because v3.0.2.0 was released before 2019.