yiisae該如何在SAE上部署

來源:互聯網
上載者:User
最近嘗試在sae上面部署Yii,於是下載了yiisae1.1.3,解壓並按照readme的說明,將yiisae下的framework複製到了yii/framework/下面,然後在protected/config/main.php中按照 https://code.google.com/p/yii-sae/作了一下配置,如下所示:
if(defined('SAE_TMP_PATH')){    //SAE 不支援I/O    $config['runtimePath'] = SAE_TMP_PATH;    //配置為 SAEDbConnection 則不必考慮使用者名稱密碼 並自動讀寫分離    $config['components']['db'] = array(            'class'=>'SAEDbConnection',            'charset' => 'utf8',        'tablePrefix'=>'tbl_',            'emulatePrepare' => true,            //開啟sql 記錄            'enableProfiling'=>true,            'enableParamLogging'=>true,            //cache            'schemaCachingDuration'=>3600,    );    //SAE不支援I/O 使用storage 儲存 assets。 如果在正式環境,請將發布到assets的css/js做合并,直接放到app目錄下,storage的分鐘限額為5000,app為200000    //最新的SAE 不使用storage 而是在siteController中,匯入了一個SAEAssetsAction,通過 site/assets?path=aaa.txt ,將檔案內容輸出到web端,來訪問實際的 aaa.txt 檔案,     $config['components']['assetManager'] = array('class' => 'SAEAssetManager','domain'=> 'assets');    //如果沒有必要,不用修改緩衝配置。 SAE不支援本地檔案的IO處理 已經提供了memcache    $config['components']['cache'] = array(            'class'=> 'SAEMemCache',            'servers'=>array(                array('host'=>'localhost', 'port'=>11211, 'weight'=>100),            ),        );}


配置之後,掛到sae上訪問,卻會報諸如:
include(SAEMemCache.php) [function.include]: failed to open stream: No such file or directory
這樣的類檔案載入不了的錯誤(代碼中第7和第22行的類),是不是我把這些目錄和檔案放錯了地方導致的?還是得在別的地方再作另外的配置呢?我的目錄結構是這樣的:
|--1/
|--branches/
|--www/
|--assets/
|--protected/
|--...
|--...
|--yii/
|--framework/
|--base/
|--caching/
|--cli/
|--collections/
|--db/
|-- framework/
|--sae/
|--vendors/
|--YiiBase.php
|--yiilite.php
|--gii/
|--....
.....
|--vendors/
...
|--YiiBase.php
|--yiilite.php
|--....
.....


回複討論(解決方案)

你開通了他的 memcache 服務嗎?

你開通了他的 memcache 服務嗎?
開通了

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.