解决Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file or directory in /system/library/cache/file.php on line 68问题
ytkah在调试opencart项目时提示Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file or directory in /system/library/cache/file.php on line 68,出现这个问题首先确认是否权限不够,如果权限不够,可以把对应的文件夹设为777。以下是详细的解决方案
1.设置权限,/system/storage/和/image/设为755或777
chmod 0755 or 0777 system/storage/cache/
chmod 0755 or 0777 system/storage/download/
chmod 0755 or 0777 system/storage/logs/
chmod 0755 or 0777 system/storage/modification/
chmod 0755 or 0777 system/storage/session/
chmod 0755 or 0777 system/storage/upload/
chmod 0755 or 0777 system/storage/vendor/
chmod 0755 or 0777 image/
chmod 0755 or 0777 image/cache/
chmod 0755 or 0777 image/catalog/
2.清理缓存:extensions - modification - refresh
dashboard - cache右上角 - refresh
浏览器清理缓存:ctrl + f5强制刷新
3.如果还是出现那个提示,可以试试更新/system/library/cache/file.php文件
<?php
namespace Cache;
class File {
private $expire; public function __construct($expire = 3600) {
$this->expire = $expire; $files = glob(DIR_CACHE . 'cache.*'); if ($files) {
foreach ($files as $file) {
$filename = basename($file); $time = substr(strrchr($file, '.'), 1); if ($time < time()) {
$this->delete(substr($filename, 6, strrpos($filename, '.') - 6));
}
}
}
} public function get($key) {
$files = glob(DIR_CACHE . 'cache.' . basename($key) . '.*'); if ($files) {
$handle = fopen($files[0], 'r'); flock($handle, LOCK_SH); $size = filesize($files[0]); if ($size > 0) {
$data = fread($handle, $size);
} else {
$data = '';
} flock($handle, LOCK_UN); fclose($handle); return json_decode($data, true);
} return false;
} public function set($key, $value) {
$this->delete($key); $file = DIR_CACHE . 'cache.' . basename($key) . '.' . (time() + $this->expire); $handle = fopen($file, 'w'); flock($handle, LOCK_EX); fwrite($handle, json_encode($value)); fflush($handle); flock($handle, LOCK_UN); fclose($handle);
} public function delete($key) {
$files = glob(DIR_CACHE . 'cache.' . basename($key) . '.*'); if ($files) {
foreach ($files as $file) {
if (!@unlink($file)) {
clearstatcache(false, $file);
}
}
}
}
}
具体文件以官方为准https://github.com/opencart/opencart/edit/master/upload/system/library/cache/file.php
解决Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file or directory in /system/library/cache/file.php on line 68问题的更多相关文章
- 一次library cache pin故障的解决过程
内容如下: 今天接到同事的电话,说他的一个存储过程已经run了一个多小时了,还在继续run,他觉得极不正常,按道理说不应该run这么长时间. 我说那我去看一下吧. 这个库是一个AIX上的10.2.0. ...
- 共享池之六:shared pool latch/ library cache latch /lock pin 简介
latch:library cache --desc v$librarycache; latch:library cache用于保护hash bucket.library cache lock保护HA ...
- Library cache lock/pin详解
Library cache lock/pin 一.概述 ---本文是网络资料加metalink 等整理得来一个实例中的library cache包括了不同类型对象的描述,如:游标,索引,表,视图,过程 ...
- 深入理解shared pool共享池之library cache的library cache lock系列四
本文了解下等待事件library cache lock,进一步理解library cache,之前的文章请见: 深入理解shared pool共享池之library cache的library ca ...
- 深入理解shared pool共享池之library cache的library cache pin系列三
关于library cache相关的LATCH非常多,名称差不多,我相信一些人对这些概念还是有些晕,我之前也有些晕,希望此文可以对这些概念有个更为清晰的理解,本文主要学习library cache p ...
- Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例
业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下 Tue Sep :: WARNING: inbound ...
- Library Cache: Lock, Pin and Load Lock
What is "Library cache lock" ? This event controls the concurrency between clients of the ...
- 产生library cache latch原因
产生library cache latch原因The library cache latches protect the cached SQL statements and objects' defi ...
- 共享池之八:软解析、硬解析、软软解析 详解一条SQL在library cache中解析涉及的锁
先来张大图: 结合上图来说明一下解析的各个步骤涉及的锁. 软解析.硬解析.软软解析区别的简单说明: 为了将用户写的sql文本转化为oracle认识的且可执行的语句,这个过程就叫做解析过程. 解析分为硬 ...
随机推荐
- 使用virtualenvwrapper模块管理python虚拟环境
1.pip安装virtualenvwrapper [root@localhost ~]# pip install virtualenvwrapper # 安装virtualenvwrapper [ro ...
- Git使用七:修改最后一次提交、删除文件和重命名文件
修改最后一次提交: 在实际开发中,可能会遇到以下两种情景:情景一:版本刚一提交(commit)到仓库,突然想起漏掉两个文件还没有添加(add).情景二:版本刚一提交(commit)到仓库,突然想起版本 ...
- pta编程总结2
7-1 币值转换 (20 分) 输入一个整数(位数不超过9位)代表一个人民币值(单位为元),请转换成财务要求的大写中文格式.如23108元,转换后变成"贰万叁仟壹百零捌"元.为了简 ...
- docker 搭建以太坊私有链搭建
最近区块链,火得不行,身边也有朋友准备玩这个,说是搭了一个星期,没有把环境搭建起来,叫我帮忙看看环境怎么搭建 于是我找到了官方的地址 https://github.com/ethereum/go-et ...
- thinkphp5调用阿里大鱼短信
:在Controller.php public function send() { if (request()->isPost()) { $phone = input('post.phone/s ...
- Codeforces 522D Closest Equals
题解: 傻逼题 直接从左向右扫描每个点作为右端点 然后单点修改区间查询就行了 另外一种更直观的做法就是$(i,j)$之间产生了$(j-i)$ 于是变成矩形查最大值,kd-tree维护 代码: #inc ...
- numpy有什么用【老鱼学numpy】
老鱼为了跟上时代潮流,也开始入门人工智能.机器学习了,瞬时觉得自己有点高大上了:). 从机器学习的实用系列出发,我们会以numpy => pandas => scikit-learn =& ...
- yii2的csrf验证原理分析及token缓存解决方案
本文主要分三个部分,首先简单介绍csrf,接着对照源码重点分析一下yii框架的验证原理,最后针对页面缓存导致的token被缓存提出一种可行的方案.涉及的知识点会作为附录附于文末. 1.CSRF描述 C ...
- ef core的外键约束笔记
ef core设置可选外键,有如下几种方式:1.在依赖实体AAA中,并不显式设置外键属性XXXId 2.手动设置外键属性XXXId为可空类型(int?等类型) 3.在实体类与数据表进行映射时,配置狭隘 ...
- Windows Vue 安装
https://nodejs.org/dist/v6.9.5/node-v6.9.5-x64.msi 新建文件夹 node_global新建文件夹 node_cachenpm config set p ...