Hi all,
I am running oc 3.0.3.2 with Journal 3 and I get this error at the bottom of my product page. I see this error from time to time. Once I refresh the page it's gone. Also, i cannot reproduce the error somehow, I just see it sometimes there. Can anyone help me with this issue?
the warning is as such:
warning: unlink(/var/www/vhosts/*******/*******/system/storage/cache.catalog.language.1231364664): No such file or directory in /var/www/vhosts/********/*******/system/library/cache/file.php online 68
line 68 of file.php is as such:
public function delete($key) {
$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');
if ($files) {
foreach ($files as $file) {
if (file_exists($file)) {
line 68---->> unlink($file);
}
}
}
}
}
Thank you very much!
Georgia
Try this fix. https://github.com/opencart/opencart/co ... 990171168e
Once you have fixed it, you need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, like you have found, it can also be a security risk.
1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.
2. In system/config/default.php set error_display to false.
3. In your OpenCart Setting on the server tab set Display Errors to No.
Once you have fixed it, you need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, like you have found, it can also be a security risk.
1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.
2. In system/config/default.php set error_display to false.
3. In your OpenCart Setting on the server tab set Display Errors to No.
you can add ocmod like this to fix error
Code: Select all
<file path="system/library/cache/file.php">
<operation error="skip">
<search trim="true"><![CDATA[unlink($file);]]></search>
<add position="replace"><![CDATA[@unlink($file);]]></add>
</operation>
</file>
HP Web Design
http://hpwebdesign.io
Opencart Extension Development | OpenCart Professional Services | OpenCart Tutorials
That doesn't fix the issue, just hides it. The problem is language was trying to read the 'language' cache, but writing the 'catalog.language' cache. This will cause the cache to be written on every request, greatly increasing the chance of a race condition.hpwebdesign wrote: ↑Mon Jan 24, 2022 8:09 amyou can add ocmod like this to fix errorCode: Select all
<file path="system/library/cache/file.php"> <operation error="skip"> <search trim="true"><![CDATA[unlink($file);]]></search> <add position="replace"><![CDATA[@unlink($file);]]></add> </operation> </file>
Who is online
Users browsing this forum: GoGo OpenCart and 140 guests