简体   繁体   English

亚马逊EC2服务器上的yii登录错误

[英]yii login error at amazon ec2 servers

i had a perfectly working login system in my localhost based on yii framework. 我在基于yii框架的localhost中拥有一个运行良好的登录系统。

but once i uploaded the files to my amazon servers it gives an error saying 但是一旦我将文件上传到我的亚马逊服务器上,它就会出现错误提示

Application runtime path "/var/www/html/dashboard/yii-Framework/protected/runtime" is not valid. 应用程序运行时路径“ / var / www / html / dashboard / yii-Framework / protected / runtime”无效。 Please make sure it is a directory writable by the Web server process. 请确保它是Web服务器进程可写的目录。

/var/www/html/dashboard/yii-Framework/Yii/base/CApplication.php(289) /var/www/html/dashboard/yii-Framework/Yii/base/CApplication.php(289)

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     /**

give access to the server for writing the directory. 授予访问服务器以写入目录的权限。 use this command 使用此命令

    chmod 777 -R /var/www/html/protected/runtime

The application will then same error for assets. 然后,应用程序将对资产产生相同的错误。 use the same command but replace "runtime" with "assets" 使用相同的命令,但将“运行时”替换为“资产”

I found that the runtime folder needs to be owned by the web server process. 我发现运行时文件夹需要由Web服务器进程拥有

chown -R www-data /var/www/html/protected/runtime

I'm not sure if this is something else wrong with my system or a yii thing. 我不确定这是我的系统还是yii问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM