加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

yii – phpfog应用程序运行时路径无效

发布时间:2020-12-13 22:34:16 所属栏目:PHP教程 来源:网络整理
导读:我正在尝试在phpfog上实现yii框架附带的一个小的默认应用程序. 我已根据GIT的说明安装了它.现在,当我尝试运行它时,我收到此错误(如下). 我已经检查过以确保该目录是可写的,并且所调用的目录确实存在.我被困了,接下来我该怎么办? Application runtime path /
我正在尝试在phpfog上实现yii框架附带的一个小的默认应用程序.
我已根据GIT的说明安装了它.现在,当我尝试运行它时,我收到此错误(如下).
我已经检查过以确保该目录是可写的,并且所调用的目录确实存在.我被困了,接下来我该怎么办?

Application runtime path      /var/fog/apps/app35423/austintxous.phpfogapp.com/demos/emp/protected/runtime" is not valid.     
Please make sure it is a directory writable by the Web server process.
259             return $this->_runtimePath;
260         }
261     }
262 
263     /**
264      * Sets the directory that stores runtime files.
265      * @param string $path the directory that stores runtime files.
266      * @throws CException if the directory does not exist or is not writable
267      */
268     public function setRuntimePath($path)
269     {
270         if(($runtimePath=realpath($path))===false || !is_dir($runtimePath) ||     
!is_writable($runtimePath))
271             throw new CException(Yii::t('yii','Application runtime path "{path}" is 
not valid. Please make sure it is a directory writable by the Web server process.',272                 array('{path}'=>$path)));
273         $this->_runtimePath=$runtimePath;
274     }
275 
276     /**

277      * Returns the root directory that holds all third-party extensions.
278      * @return string the directory that contains all extensions. Defaults to the  
'extensions' directory under 'protected'.
279      */
280     public function getExtensionPath()
281     {
282         return Yii::getPathOfAlias('ext');
283     }

解决方法

Web服务器无法写入运行时目录.确保它存在,并将其所有权更改为您的Web服务器,或设置chmod 777(如果它是您的开发环境,这是一个很好的解决方案).

cd [project directory]
chmod 777 protected/runtime

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读