So my site that has been working for years suddenly generates this error on frontend
Warning: fopen(/web/markr/parfumorigo.hu/system/logs/error.txt) [function.fopen]: failed to open stream: Value too large for defined data type in /web/markr/parfumorigo.hu/system/library/log.php on line 12
Warning: fwrite(): supplied argument is not a valid stream resource in /web/markr/parfumorigo.hu/system/library/log.php on line 14
Warning: fclose(): supplied argument is not a valid stream resource in /web/markr/parfumorigo.hu/system/library/log.php on line 16
After this error the page is displayed below as per normal. I tried looking for this particular problem with no luck here on forums. So could someone give me some info on how to deal with this?
Warning: fopen(/web/markr/parfumorigo.hu/system/logs/error.txt) [function.fopen]: failed to open stream: Value too large for defined data type in /web/markr/parfumorigo.hu/system/library/log.php on line 12
Warning: fwrite(): supplied argument is not a valid stream resource in /web/markr/parfumorigo.hu/system/library/log.php on line 14
Warning: fclose(): supplied argument is not a valid stream resource in /web/markr/parfumorigo.hu/system/library/log.php on line 16
After this error the page is displayed below as per normal. I tried looking for this particular problem with no luck here on forums. So could someone give me some info on how to deal with this?
It looks like your log file ("error.txt") is full!
You just need to empty it.
You just need to empty it.
OpenCart custom solutions @ https://villagedefrance.net
Ok, so is the actual file "error.txt" effectively empty (file size = 0)? ... and the actual file permissions still allowing Read/Write (644 or 777)?
OpenCart custom solutions @ https://villagedefrance.net
Empty txt under system/logs/error.txt, and premissions set to 777villagedefrance wrote:Ok, so is the actual file "error.txt" effectively empty (file size = 0)? ... and the actual file permissions still allowing Read/Write (644 or 777)?
Is your code similar to this in your system/library/log.php file?
Code: Select all
public function write($message) {
$file = DIR_LOGS . $this->filename;
$handle = fopen($file, 'a');
fwrite($handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n");
fclose($handle);
}
OpenCart custom solutions @ https://villagedefrance.net
This is the code of the mentioned .php
<?php
class Log {
private $filename;
public function __construct($filename) {
$this->filename = $filename;
}
public function write($message) {
$file = DIR_LOGS . $this->filename;
$handle = fopen($file, 'a+');
fwrite($handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n");
fclose($handle);
}
}
?>
Just manage to solve the issue by deleting everything contained in the logs folder.
Recreated index.html and error.txt and set up the permission again to 777. Dunno why just deleting the content previously didn't work. But now it's solved.
Recreated index.html and error.txt and set up the permission again to 777. Dunno why just deleting the content previously didn't work. But now it's solved.
Who is online
Users browsing this forum: No registered users and 22 guests