Page 1 of 1

1.30 on Debian(unstable) - zmninja API issues

Posted: Thu Sep 22, 2016 8:32 am
by sharkspear
Hello, I decided to run with debian jessie 8 (Kernel: Debian 3.16.36-1+deb8u1) cause of issues with AMD-GPU under Ubuntu 16.04 xenial.
the package has been pulled from unstable. Regular interface is working fine, camera-'streams' are visible too.

But I cant access the api with zmNinja. The login-validation succeeds, but then stops with Error: Login validated but API failed.

apache2/conf-enabled/zoneminder.conf:

Code: Select all

# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>

Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>

<Directory /usr/share/zoneminder/www/api>
    AllowOverride All
</Directory>
apache2/apache2.conf:

Code: Select all

<Directory />
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

<Directory /usr/share>
        AllowOverride All
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

php5-gd is installed and web/views/image.php has been replaced as adviced.
Symbolic-links are set too

PATH_ZMS in Zoneminder is set to: /zm/cgi-bin/nph-zms

http://serverip/zm/api shows all green except Debug
http://serverip/zm/api/host/getVersion.json returns 1.30 and 1.0 for API

I checked all permissions of the filesystem and they are writable for www-data.

when running from a browser: "http://<srv-ip>/zm/cgi-bin" the return is: Permission denied.

Has anyone a hint what else could cause this behaviour?

Re: 1.30 on Debian(unstable) - zmninja API issues

Posted: Fri Sep 23, 2016 12:02 am
by bbunge
From the Zoneminder WIKI for Debian with ZM 1.29.0. Let us know if this fix works for you...

bb

https://wiki.zoneminder.com/Debian_8_64 ... e_Easy_Way

27FEB16 A problem has been cited that requires the following to allow the API to work properly:

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/

Edit /etc/apache2/conf-enabled/zoneminder.conf

nano /etc/apache2/conf-enabled/zoneminder.conf

Add at the bottom:

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>

Ctrl+o Enter to save

CTRL+x to exit

Restart Apache

service apache2 restart

Re: 1.30 on Debian(unstable) - zmninja API issues

Posted: Fri Sep 23, 2016 1:54 am
by bbunge
bbunge wrote:From the Zoneminder WIKI for Debian with ZM 1.29.0. Let us know if this fix works for you...

bb

https://wiki.zoneminder.com/Debian_8_64 ... e_Easy_Way

27FEB16 A problem has been cited that requires the following to allow the API to work properly:

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/

Edit /etc/apache2/conf-enabled/zoneminder.conf

nano /etc/apache2/conf-enabled/zoneminder.conf

Add at the bottom:

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>

Ctrl+o Enter to save

CTRL+x to exit

Restart Apache

service apache2 restart
Edit: I just tried an install from the testing repository and failed. Noticed that PHP7 was installed. Will try to iron out the bugs over the weekend

Re: 1.30 on Debian(unstable) - zmninja API issues

Posted: Fri Sep 23, 2016 11:19 am
by sharkspear
bbunge wrote:
bbunge wrote:From the Zoneminder WIKI for Debian with ZM 1.29.0. Let us know if this fix works for you...

bb

https://wiki.zoneminder.com/Debian_8_64 ... e_Easy_Way

27FEB16 A problem has been cited that requires the following to allow the API to work properly:

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/

Edit /etc/apache2/conf-enabled/zoneminder.conf

nano /etc/apache2/conf-enabled/zoneminder.conf

Add at the bottom:

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>

Ctrl+o Enter to save

CTRL+x to exit

Restart Apache

service apache2 restart
Edit: I just tried an install from the testing repository and failed. Noticed that PHP7 was installed. Will try to iron out the bugs over the weekend

Thanks for beeing after it. My first aproach was on a Debian headless. On this System the same unstable-repo was pulled and upgraded. I had no issues with zmninja. sadly i totally messed the x-window-system while testing so I needed to reinstall the whole system.

Re: 1.30 on Debian(unstable) - zmninja API issues

Posted: Fri Sep 23, 2016 2:14 pm
by sharkspear
Ok. I managed it.

Pulled the git and used pkg-checkdeps for debian to find the the missing libs. after a successfull build I installed it over the unstable version.
zmninja is working now.

wish all of you a nive weekend!