Post by aljo91258 » Wed May 05, 2021 12:34 am

Hi,
randomly I get this error message:
Warning: unlink(/home/customer/www/XXX.eu/storage/cache/cache.store.1619857657): No such file or directory in /home/customer/www/XXX.eu/public_html/YYYYYY/system/library/cache/file.php on line 17
Opencart version is 3.0.3.2 / PHP 7.3.27
I tried the language cache fix (https://github.com/opencart/opencart/co ... 990171168e)
I created a file named "cache.store.1619857657"
I made "system/library/cache/file.php" folder writable with CHMOD 755

But nothing works - the warning continues to appear (also to users when they are on product pages)

Maybe somebody has a new idea?

Newbie

Posts

Joined
Sat Aug 11, 2018 4:03 am

Post by OSWorX » Wed May 05, 2021 3:12 am

aljo91258 wrote:
Wed May 05, 2021 12:34 am
.. the warning continues to appear (also to users when they are on product pages) ..
Beside this message, the first and most important action should be to disable the Display Errors in your shop configuration after you set it live.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by aljo91258 » Wed May 05, 2021 4:18 am

"Display Errors" is already disabled. Only "Log Errors" is on yes.

Newbie

Posts

Joined
Sat Aug 11, 2018 4:03 am

Post by straightlight » Wed May 05, 2021 7:43 am

The cache file library does not need to be set to CHMOD 0755. The storage needs to be outside of your www folder and recursively set to CHMOD 0755 and the files needs to remain the way they are on this folder. Then, ensure both config.php files are properly configured with your DIR_STORAGE constant.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Wed May 05, 2021 5:19 pm

aljo91258 wrote:
Wed May 05, 2021 12:34 am
Maybe somebody has a new idea?
Pay a developer from Commercial Support?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by ADD Creative » Wed May 05, 2021 7:19 pm

aljo91258 wrote:
Wed May 05, 2021 4:18 am
"Display Errors" is already disabled. Only "Log Errors" is on yes.
There is always a chance you will get a race condition as you can get the problem of:
Process 1 checks if the old cache file exists. Which it does.
Process 2 checks if the old cache file exists. Which it does.
Process 1 deletes the old cache file with unlink. Which will be successful.
Process 2 deletes the old cache file with unlink. Which will fail as process 1 has already deleted it.

As long as you have display errors set to off (in all three places) then there should not be an issue.

If you did want to suppress the warning in you logs, you could always add a @ in front of unlink at the line below.
https://github.com/opencart/opencart/bl ... le.php#L68

Code: Select all

@unlink($file);
If you are getting a lot of unlink errors and the cache file does not exist. Then it could be an issue with the store cache not being read correctly. This would cause the store cache to be deleted and set on each request. Greatly increasing the chances of a race condition. Could be caused by a permission issue or a modification.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by aljo91258 » Thu May 06, 2021 10:01 pm

Thank you for your comments.
For the moment I think I solved the issue, the site is workin fine. I simply deleted in storage/cache all cache.store.xxxxxxxx files. There were almost 1000 of them in the folder storage/cache and may be because of that, file operations broke down when new files came in. Therefore these new files couldn't be found later on. But why is it, that the old cache.storage.xxxx files are not deleted after a certain period of time and that they simply cumulate in this folder storage/cache?

Newbie

Posts

Joined
Sat Aug 11, 2018 4:03 am

Post by straightlight » Thu May 06, 2021 10:36 pm

aljo91258 wrote:
Thu May 06, 2021 10:01 pm
Thank you for your comments.
For the moment I think I solved the issue, the site is workin fine. I simply deleted in storage/cache all cache.store.xxxxxxxx files. There were almost 1000 of them in the folder storage/cache and may be because of that, file operations broke down when new files came in. Therefore these new files couldn't be found later on. But why is it, that the old cache.storage.xxxx files are not deleted after a certain period of time and that they simply cumulate in this folder storage/cache?
Ensure to keep the index.html file in the cache folder. However, now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your first post.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Thu May 06, 2021 11:37 pm

aljo91258 wrote:
Thu May 06, 2021 10:01 pm
Thank you for your comments.
For the moment I think I solved the issue, the site is workin fine. I simply deleted in storage/cache all cache.store.xxxxxxxx files. There were almost 1000 of them in the folder storage/cache and may be because of that, file operations broke down when new files came in. Therefore these new files couldn't be found later on. But why is it, that the old cache.storage.xxxx files are not deleted after a certain period of time and that they simply cumulate in this folder storage/cache?
The unlink is trying to delete them, if it isn't then it could be a permissions or a configuration issue with storage/cache.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 26 guests