problem after upgrade accessing cgi-bin URL

Forum for questions and support relating to the 1.34.x releases only.
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

problem after upgrade accessing cgi-bin URL

Post by Mozart »

Hi,

I upgraded zm from 1.32 to 1.34 and that went well. Only thing is that the following entry on a webpage does not work anymore:

Code: Select all

 http://zm05.home.intra/zm/cgi-bin/nph-zms?mode=jpeg&maxfps=5&monitor=6&user=user&pass=pass
This used to work without a problem but not anymore. I saw on the documentation that there is a new way with a auth code but that code expires and is not useful when you want to include a stream on a webpage.

If I open the url in a browser I get http error 403.

The api does work I think because I use zmNinja and that still works.
How can I troubleshoot this or is there a different way to get the same result?

Update:
I installed a new Zoneminder 1.34 on Ubuntu 18 and there it does work. Now I have two options:
1. Find the difference between the two
2. Migrate all cams, users and settings from the old to the new server
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: API problem after upgrade

Post by bbunge »

Do not think the issue is related to API.
I use this code for a camera wall:
<html>
<meta http-equiv="refresh" content="300">
<body>
<p>Backyard</p>
<img src="http://192.168.50.2/zm/cgi-bin/nph-zms? ... 1579444465">
</body>
</html>
Actually I use two cams but just show one. I enabled OPT_USE_AUTH with AUTH_RELAY of None. Created a user with password with View Stream only. Logged in as that user, opened a monitor, right clicked on the video stream, selected view image and used that URL for the img src=
The "user" did not have API enabled.
Maybe the resulting URL changed when you upgraded?

Tested on Ubuntu 18.04 with Mariadb Server and Zoneminder 1.34.0 (fresh install). Am also using this same method on a Pi 3b+ with Buster and ZM 1.33.16.
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: API problem after upgrade

Post by Mozart »

I tried that as well but just does not work. I also did a compare of the Apache config files but could not find a difference.
rockedge
Posts: 1178
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: API problem after upgrade

Post by rockedge »

there has been changes to methods of passing authority. Take a look in Options/Systems that the legacy authority system is enable
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: API problem after upgrade

Post by iconnor »

That really should work. I'll look into it tomorrow
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API problem after upgrade

Post by asker »

Works for me.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: API problem after upgrade

Post by Mozart »

These are the settings of the system that does not work:
C70C957B-B1BB-42F8-9AA9-6F96A02ED387.jpeg
C70C957B-B1BB-42F8-9AA9-6F96A02ED387.jpeg (565.93 KiB) Viewed 61189 times
These are the settings of the system that does work:
1597E626-F431-4814-BD41-679083419382.jpeg
1597E626-F431-4814-BD41-679083419382.jpeg (547.69 KiB) Viewed 61189 times
I see no difference in options so it must be something else.
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: API problem after upgrade

Post by bbunge »

Try auth_relay none
User avatar
Harold Marshall
Posts: 7
Joined: Sun Jan 19, 2020 4:19 pm

Re: API problem after upgrade

Post by Harold Marshall »

Same problem here. A fresh install + just installed Event Server succesfully -> trying to get zmNinja working. 1.34 on Ubuntu 19.10.
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: API problem after upgrade

Post by Mozart »

bbunge wrote: Wed Jan 22, 2020 10:23 pm Try auth_relay none
That solved it for me and since it is an internal system I don’t mind but it should also work with hashed anyway.
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: API problem after upgrade

Post by bbunge »

Harold Marshall wrote: Thu Jan 23, 2020 4:40 pm Same problem here. A fresh install + just installed Event Server succesfully -> trying to get zmNinja working. 1.34 on Ubuntu 19.10.
As I stated earlier the OP's issue was not with the API.

Make sure you have the latest ZmNinja. Make sure you have enabled the API for the ZmNinja user.
Mozart
Posts: 17
Joined: Fri Aug 26, 2016 8:41 am

Re: API problem after upgrade

Post by Mozart »

bbunge wrote: Thu Jan 23, 2020 7:25 pm
Harold Marshall wrote: Thu Jan 23, 2020 4:40 pm Same problem here. A fresh install + just installed Event Server succesfully -> trying to get zmNinja working. 1.34 on Ubuntu 19.10.
As I stated earlier the OP's issue was not with the API.

Make sure you have the latest ZmNinja. Make sure you have enabled the API for the ZmNinja user.
That’s correct, zmNinja works on both systems.
vvchumanov
Posts: 4
Joined: Sun Jul 15, 2018 8:49 pm

Re: problem after upgrade accessing cgi-bin URL

Post by vvchumanov »

who fix this ???
i'm try all...
and video on wall work's, but on events and single camera tab don't works
volfan6415
Posts: 9
Joined: Tue Apr 03, 2018 1:10 pm

Re: problem after upgrade accessing cgi-bin URL

Post by volfan6415 »

has this been fixed? Or is the only way to make this work is to turn of Auth_hashing?
gintibande
Posts: 1
Joined: Fri Apr 29, 2022 12:23 pm

Re: problem after upgrade accessing cgi-bin URL

Post by gintibande »

I also did a compare of the Apache config files but could not find a difference. mobdro apk
Post Reply