PHP warning

filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /var/www/html/multigroup/files/gr_demyansk_solyanka/ab0148742a78cc5704152f5077a2e1c3.pdf

/var/www/html/multigroup/protected/components/Uploader.php(56)

44     {
45         $this->model = Models::model()->find('class_name = ?', array($className));
46         $this->filesDir = UploaderConfig::get()->filesDir;
47         $this->imagesDir = UploaderConfig::get()->imgDir;
48         $this->fileTypes = UploaderConfig::$fileTypes;
49         $this->fileAssociations = UploaderConfig::$fileAssociations;
50     }
51     
52     public static function processDownload($file)
53     {
54         if (!$file) return false;
55         // данные
56         $fileSize = filesize(UploaderConfig::get()->filesDir.'/'.$file->imageFile);
57         $filemtime = filemtime(UploaderConfig::get()->filesDir.'/'.$file->imageFile);
58         
59         // заголовки
60         header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');// Отправляем требуемые заголовки
61         header('Last-Modified: ' . gmdate('r', $filemtime));
62         header("Accept-Ranges: bytes"); //Указываем что размер файла будет в байтах
63         header("Content-Length: ".$fileSize); //Передаём размер
64         header("Content-Type: application/force-download");
65         header('Connection: close');
66         header("Content-Disposition: attachment; filename=\"".iconv('utf-8','windows-1251',$file->originalName)."\"");
67         
68         // отправка

Stack Trace

#0
+
 /var/www/html/multigroup/protected/components/Uploader.php(56): filesize("/var/www/html/multigroup/files/gr_demyansk_solyanka/ab0148742a78...")
51     
52     public static function processDownload($file)
53     {
54         if (!$file) return false;
55         // данные
56         $fileSize = filesize(UploaderConfig::get()->filesDir.'/'.$file->imageFile);
57         $filemtime = filemtime(UploaderConfig::get()->filesDir.'/'.$file->imageFile);
58         
59         // заголовки
60         header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');// Отправляем требуемые заголовки
61         header('Last-Modified: ' . gmdate('r', $filemtime));
#1
+
 /var/www/html/multigroup/protected/controllers/FileController.php(21): Uploader::processDownload(File)
16         $file = File::model()->find('id=?', array($this->activeID));
17         if (!$file)
18         {
19             $this->render('/alert/error-message', array('message'=>'Файл не найден'));
20         }
21         Uploader::processDownload($file);
22     }
23     
24     public function actionRefList()
25     {
26         // сюда мы никогда не должны попасть
#9
+
 /var/www/html/multigroup/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-29 05:59:04 Apache/2.4.43 (Unix) Yii Framework/1.1.12