1
我開發使用的Kohana 3.2加載以下模塊的web應用程序:的Kohana 3.2不加載配置文件
- useradmin
- 權威性
- 數據庫
- ORM
- 分頁
- oauth
- kohana-email
在我的開發機器(帶有Apache的Mac OS X Lion)上一切都很好。
在運行ubuntu 10.04和nginx 1.1.0的網絡服務器上,配置文件沒有加載。
這在我嘗試登錄時生效。 Kohana給我以下錯誤:
A valid hash key must be set in your auth config.
如果我看看Kohana :: $ config,它是空的。這給了我的結論,我的配置沒有加載。
有沒有人有一個想法是什麼會導致這樣的行爲。
我的目錄看起來像這樣
application/
├── bootstrap.php
├── cache
├── classes
│ ├── controller
│ │ ├── …
│ └── model
├── config
│ ├── auth.php
│ ├── database.php
│ └── pagination.php
├── i18n
│ └── …
├── logs
│ └── …
├── messages
└── views
└── template
└── default.php
編輯:但我想,誤差必須在我的服務器環境中,這是我的nginx的配置。
server { listen 80;
root /srv/www/;
index index.php;
location/{
try_files $uri /index.php?$query_string;
}
location /index.php {
fastcgi_param KOHANA_ENV development;
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include /etc/nginx/fastcgi_params;
}
}
那樣的死亡不會導致成功。 $ config變量保持爲空。我想這個錯誤需要在我的服務器環境中進行搜索,以便在我的開發機器上運行時該應用程序正在工作。 – Corvus
嗯......奇怪。檢查你的配置文件夾是否有寫入權限。這種情況並不重要,但它必須是可寫的 – ZolaKt
嗯......奇怪!但是這個伎倆。非常感謝。 – Corvus