Code: Select all
Warning (2): require_once(../../../includes/config.php): failed to open stream: No such file or directory [APP/Config/bootstrap.php, line 123]
Fatal error: require_once() [function.require]: Failed opening required '../../../includes/config.php' (include_path='.:/usr/local/share/pear') in /usr/local/www/zoneminder/api/app/Config/bootstrap.php on line 123
Notice (8): Use of undefined constant ZM_OPT_USE_API - assumed 'ZM_OPT_USE_API' [APP/Controller/AppController.php, line 63]
Notice (8): Use of undefined constant ZM_OPT_USE_AUTH - assumed 'ZM_OPT_USE_AUTH' [APP/Controller/AppController.php, line 72]
Warning (2): require_once(../../../includes/auth.php) [<a href='http://php.net/function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory [APP/Controller/AppController.php, line 73]
Fatal error: require_once() [function.require]: Failed opening required '../../../includes/auth.php' (include_path='.:/usr/local/share/pear') in /usr/local/www/zoneminder/api/app/Controller/AppController.php on line 73
This looks impossible - getcwd() is /usr/local/www/zoneminder/api with this rewrite, so ../../../ is obviously wrong.
Full config (ZM web interface is fully operational with this one, only api throws errors):
Code: Select all
server {
listen 80;
location /cgi-bin/nph-zms {
gzip off;
root /usr/local/www/zoneminder;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
}
location /zm/cache {
alias /var/cache/zoneminder;
}
location /zm {
gzip off;
alias /usr/local/www/zoneminder;
index index.php;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php-fpm.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
location /zm/api/ {
alias /usr/local/www/zoneminder;
rewrite ^/zm/api(.+)$ /zm/api/index.php?p=$1 last;
}
}
}