解决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认识的且可执行的语句,这个过程就叫做解析过程. 解析分为硬 ...
随机推荐
- flutter 新增安卓ios 闪图
ios 中新增闪图 flutter 中用xcode 打开 ios 项目 ios 在 Asset.xcassets中新增图片 如果 图片名称不一样需要修改配置文件 Contents.json 2.在安卓 ...
- 2018年发表论文阅读:Convolutional Simplex Projection Network for Weakly Supervised Semantic Segmentation
记笔记目的:刻意地.有意地整理其思路,综合对比,以求借鉴.他山之石,可以攻玉. <Convolutional Simplex Projection Network for Weakly Supe ...
- VMware虚拟机下安装CentOS6.5
点击创建虚拟机 选择典型—>下一步 选择安装iso映像文件—>点击浏览选择下载好的centos 镜像文件—>下一步 设置用户和密码—>下一步 设置虚拟机的名字和位置 指定磁盘大 ...
- Spring Conditional注解使用小结
今天我们来总结下Conditional注解的使用. Conditional注解 增加配置类Config package condition; import org.springframework.co ...
- 5.基于优化的攻击——CW
CW攻击原论文地址——https://arxiv.org/pdf/1608.04644.pdf 1.CW攻击的原理 CW攻击是一种基于优化的攻击,攻击的名称是两个作者的首字母.首先还是贴出攻击算法的公 ...
- String,StringBuffer,StringBudilder区别--2019-04-13
String,StringBuffer,StringBudilder区别: 1String 是字符串常量,创建内容不可以变, final修饰意味着String类型不能被继承,减少被修改的可能,从而最大 ...
- Django表单字段汇总
Field.clean(value)[source] 虽然表单字段的Field类主要使用在Form类中,但也可以直接实例化它们来使用,以便更好地了解它们是如何工作的.每个Field的实例都有一个cle ...
- CSS文字溢出处理问题
单行省略 div { white-space:nowrap; //断行处理:无断行 text-overflow:ellipsis; //文字溢出处理:省略号 overflow:hidden; //溢出 ...
- Python编程中出现ImportError: bad magic number in 'numpy': b'\x03\xf3\r\n'
在终端输入ls -a 会出现一个.pyc的文件,将文件删掉
- (75)Wangdao.com第十三天_JavaScript 包装对象
包装对象 所谓“包装对象”,就是分别与数值.字符串.布尔值相对应的Number.String.Boolean三个原生对象 这三个原生对象可以把原始类型的值变成(包装成)对象 var v1 = new ...