I am developing a web app using Kohana 3.2 with the following modules loaded:
- useradmin
- auth
- database
- orm
- pagination
- oauth
- kohana-email
On my development machine (Mac OS X Lion with Apache) everything its fine.
On my web server running ubuntu 10.04 with nginx 1.1.0 the config files are not loaded.
This comes to effect when i try to login. Kohana gives me the following error:
A valid hash key must be set in your auth config.
If I have a look at Kohana::$config, it is empty. Which gives me the conclusion that the my configurations are not loaded.
Does anyone have an idea what can cause such a behavior.
My directory looks like this
application/
├── bootstrap.php
├── cache
├── classes
│ ├── controller
│ │ ├── …
│ └── model
├── config
│ ├── auth.php
│ ├── database.php
│ └── pagination.php
├── i18n
│ └── …
├── logs
│ └── …
├── messages
└── views
└── template
└── default.php
EDIT: For I suppose the error must be in my server environment, here is my nginx configuration.
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;
}
}
The syntax has been changed a little in 3.2
Kohana::$configwill stay empty until you actually load the config file into it, with:This has been addressed in the user guide in the migration from 3.1.x section.