CException

image directory unwritable

/home/user/web/russianasha.ru/public_html/protected/extensions/image/Image.php(380)

368     {
369         // If no new image is defined, use the current image
370         empty($new_image) and $new_image = $this->image['file'];
371 
372         // Separate the directory and filename
373         $dir = pathinfo($new_image, PATHINFO_DIRNAME);
374         $file = pathinfo($new_image, PATHINFO_BASENAME);
375 
376         // Normalize the path
377         $dir = str_replace('\\', '/', realpath($dir)) . '/';
378 
379         if (!is_writable($dir))
380             throw new CException('image directory unwritable');
381 
382         if ($status = $this->driver->process($this->image, $this->actions, $dir, $file)) {
383             if ($chmod !== FALSE) {
384                 // Set permissions
385                 chmod($new_image, $chmod);
386             }
387         }
388 
389         // Reset actions. Subsequent save() or render() will not apply previous actions.
390         if ($keep_actions === FALSE)
391             $this->actions = array();
392 

Stack Trace

#0
+
 /home/user/web/russianasha.ru/public_html/protected/extensions/images/Images.php(79): Image->save("/home/user/web/russianasha.ru/public_html/files/tours/cache/-fil...")
74                   } */
75                 $new_image->centeredpreview($width, $height);
76 
77                 if ($convert == 'jpg' || $convert == true)
78                     $new_image->png2jpg(); // ставим фон
79                 $new_image->save($new_image_name);
80             } else {
81                 return false;
82             }
83         }
84 
#1
+
 /home/user/web/russianasha.ru/public_html/protected/models/TourImages.php(185): Images->resize("22/a5/podari-mne-parizh-i-fialku-monmartra-ekskursiya-po-moskve-...", 200, 150)
180             ->setConverting(true)
181             ->setDirectory($this->images_path);
182 
183         foreach ($results as $result) {
184             $attrs = $result->attributes;
185             $attrs['src'] = Yii::app()->images->resize($attrs['src'], 200, 150);
186             $tours_images_data[$result['tour_id']] = $attrs;
187         }
188         
189         Yii::app()->images->setCacheDirectory('/files/lib/cache/')
190             ->setCacheUrlPath('/files/lib/cache/')
#2
+
 /home/user/web/russianasha.ru/public_html/protected/models/Tours.php(286): TourImages->getMainImages(array("filter_id" => array()), true)
281         }
282         
283         $dates = TourDates::model()->getMinDates($data);
284         $regions = TourRegions::model()->getToursRegions($data);
285         $themes = TourThemes::model()->getToursThemes($data);
286         $images = TourImages::model()->getMainImages($data, $resizeImages);
287         
288         /* @var Tours $result */
289         foreach ($results as $result) {
290             $tours_data[$result->id] = $result->attributes;
291             $tours_data[$result->id]['priceCurrencyCode'] = $result->priceCurrencyCode;
2024-03-19 09:19:58 Apache/2.4.57 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 Yii Framework/1.1.13