Reputation: 13
Invalid Configuration – yii\base\InvalidConfigException
The directory is not writable by the Web process:
/home/liyunfei/NetBeansProjects/my2/duangplat/publicplat/web/assets
1. in /home/liyunfei/NetBeansProjects/my2/duangplat/vendor/yiisoft/yii2/web/AssetManager.php at line 213
204205206207208209210211212213214215216217218219220221222
* @throws InvalidConfigException if [[basePath]] is invalid
*/
public function init()
{
parent::init();
$this->basePath = Yii::getAlias($this->basePath);
if (!is_dir($this->basePath)) {
throw new InvalidConfigException("The directory does not exist: {$this->basePath}");
} elseif (!is_writable($this->basePath)) {
throw new InvalidConfigException("The directory is not writable by the Web process: {$this->basePath}");
} else {
$this->basePath = realpath($this->basePath);
}
$this->baseUrl = rtrim(Yii::getAlias($this->baseUrl), '/');
}
/**
* Returns the named asset bundle.
Upvotes: 0
Views: 4205
Reputation: 735
I had this problem when I remove bundled assets folder from web folder.After 1 hour I found it and I created an assets folder in web and it's fixed.
Upvotes: 1
Reputation: 165
I know this is an old post, but in case it helps someone:
SELinux (e.g. on Centos 7) is on by default. For my purposes, I just put SELinux in permissive mode and that fixed the issue for me. That said, there is probably a best practice to allow the apache process without going to permissive mode.
Upvotes: 1