简体   繁体   中英

yii login error at amazon ec2 servers

i had a perfectly working login system in my localhost based on yii framework.

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. Please make sure it is a directory writable by the Web server process.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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