我正在同时学习 Yii 和 Git,并且发现我的提交存在问题。如果这很重要,我正在使用 BitBucket。
基本上,如果我创建一个项目并提交到 repo,当我尝试将该 repo 拉到另一台机器上时,我会从一大堆 Yii 运行时配置错误开始。
我找到了解决它的方法,但它似乎很乱。如果我在添加项目后加载旧的 repo 提交并手动删除项目,然后通过 yii 工具 (yiic) 重新添加它,我可以使用最近提交的更新覆盖它以恢复所有内容.
这看起来很混乱,就像在自找麻烦。Yii 我在这里做错了什么吗?
编辑 下面是它出现的确切错误消息:
CException
Application runtime path "/Applications/MAMP/htdocs/yii-sandbox/projects/trackstar/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process.
/Applications/MAMP/htdocs/yii-sandbox/framework/base/CApplication.php(289)
277 return $this->_runtimePath;
278 }
279 }
280
281 /**
282 * Sets the directory that stores runtime files.
283 * @param string $path the directory that stores runtime files.
284 * @throws CException if the directory does not exist or is not writable
285 */
286 public function setRuntimePath($path)
287 {
288 if(($runtimePath=realpath($path))===false || !is_dir($runtimePath) || !is_writable($runtimePath))
289 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.',
290 array('{path}'=>$path)));
291 $this->_runtimePath=$runtimePath;
292 }
293
294 /**
295 * Returns the root directory that holds all third-party extensions.
296 * @return string the directory that contains all extensions. Defaults to the 'extensions' directory under 'protected'.
297 */
298 public function getExtensionPath()
299 {
300 return Yii::getPathOfAlias('ext');
301 }