Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

ошибка PHP Warning:unlink


tailer

Recommended Posts

Добрый день!

Подскажите в чем причина?Эти ошибки каждый раз вываливаются по утро. Как исправить подскажите?

2015-06-28 5:58:13 - PHP Warning: unlink(/home/xxxx/www/xxxx/system/cache/cache.category.seopath.1435463893): No such file or directory in /home/xxxxx/www/xxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:13 - PHP Warning: unlink(/home/xxxxx/www/xxxxxx/system/cache/cache.category.seopath.1435463893): No such file or directory in /home/xxxxxxxx/www/xxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:13 - PHP Warning: unlink(/home/xxxxxxx/www/xxxxxxx/system/cache/cache.category.seopath.1435463893): No such file or directory in /home/xxxxxxxxxxxxx/www/xxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxxx/www/xxxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxx/www/xxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxx/www/xxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxx/www/xxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxx/www/xxxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxxxx/www/xxxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxxx/www/xxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxxxx/www/xxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxxxx/www/xxxxxxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxxx/www/xxxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxxx/www/xxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxx/www/xxxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxxx/www/xxxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxxx/www/xxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxx/www/xxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxxxxx/www/xxxxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48
2015-06-28 5:58:14 - PHP Warning: unlink(/home/xxxxxxxxxx/www/xxxxxxxxxx/system/cache/cache.category.seopath.1435463894): No such file or directory in /home/xxxxxxxxxx/www/xxxxxxxxxx/vqmod/vqcache/vq2-system_library_cache.php on line 48

 

Вот vq2-system_library_cache.php

<?php
class Cache { 
	private $expire = 3600; 

	public function get($key) {
		$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');

		if ($files) {
			$cache = file_get_contents($files[0]);
			
			$data = unserialize($cache);
			
			foreach ($files as $file) {
				$time = substr(strrchr($file, '.'), 1);

      			if ($time < time()) {
					if (file_exists($file)) {
						@unlink($file);
					}
      			}
    		}
			
			return $data;			
		}
	}

  	public function set($key, $value) {

			if ($key == 'sitemap') $this->expire = 90000;
			
    	$this->delete($key);
		
		$file = DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.' . (time() + $this->expire);
    	
		$handle = fopen($file, 'w');

    	fwrite($handle, serialize($value));
		
    	fclose($handle);
  	}
	
  	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)) {
					@unlink($file);
				}
    		}
		}
  	}
}
?>
Надіслати
Поділитися на інших сайтах


  • 2 weeks later...
  • 5 years later...
В 14.07.2015 в 21:27, tailer сказал:

подскажите, какие должны быть настройки чтобы избежать этих ошибок?

Ляпсь --->Сюда 

2 строчки изменить и минус головная боль...в ocStore 3.0.2.0 пролезло

Змінено користувачем Kaniel
Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.