Jump to content
Sign in to follow this  
tailer

ошибка PHP Warning:unlink

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);
				}
    		}
		}
  	}
}
?>

Share this post


Link to post
Share on other sites

неужели никто на форуме не знает в чем причина?

Share this post


Link to post
Share on other sites

кэш стандартный так работает.

нюансы зависят от хостинга и его настроек.

Share this post


Link to post
Share on other sites

Да, зависит от того как настроено кеширование ФС хостера

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.