YII Project'i sunucuda çalıştırdığımda, bu hatayı aldım.CAssetManager.basePath "/ assets" geçersiz. Lütfen dizinin var olduğundan ve Web sunucusu işlemi tarafından yazılabilir olduğundan emin olun.
CException
CAssetManager.basePath "/var/www/html/v2/assets" is invalid. Please make sure the directory exists and is writable by the Web server process.
/var/www/html/v2/yii/framework/web/CAssetManager.php(116)
104 }
105
106 /**
107 * Sets the root directory storing published asset files.
108 * @param string $value the root directory storing published asset files
109 * @throws CException if the base path is invalid
110 */
111 public function setBasePath($value)
112 {
113 if(($basePath=realpath($value))!==false && is_dir($basePath) && is_writable($basePath))
114 $this->_basePath=$basePath;
115 else
116 throw new CException(Yii::t('yii','CAssetManager.basePath "{path}" is invalid. Please make sure the directory exists and is writable by the Web server process.',
117 array('{path}'=>$value)));
118 }
119
120 /**
121 * @return string the base url that the published asset files can be accessed.
122 * Note, the ending slashes are stripped off. Defaults to '/AppBaseUrl/assets'.
123 */
124 public function getBaseUrl()
125 {
126 if($this->_baseUrl===null)
127 {
128 $request=Yii::app()->getRequest();
Bilmiyorum, nasıl çözülür? Lütfen bunun çözümünü açıklayınız?
Bu
assets
protected <-- Yii app
js
css
yii
otomatik olarak eşleşeceği için, grubunuza www-data (web-işleminiz) eklediyseniz, bu adım gerekli değildir. Eğer/var/www/html/v2/assets 'varsa webserver kullanıcısı tarafından yazılabilir değil.'/var/www/html/v2/varlıklar 'projenizin' varlıkları 'dizini değilse, uygulamanız yanlış yapılandırılmıştır – Ezze
Şimdi ne yapmalıyım? – unknownbits
Dizin varsa, yazmayı kabul etmelisiniz Manquer gibi web sunucusu işlemlerinin izinleri yazılmıştır.Ayrıca 'korumalı/çalışma zamanı 'dizini oluşturulmalı ve yazılabilir olmalıdır – Ezze