CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Forum for questions and support relating to the 1.30.x releases only.
Locked
djs11
Posts: 3
Joined: Sun Feb 18, 2018 9:49 am

CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by djs11 »

Hi all, first off apologies for posting on the ScriptAlias subject as I can see for searching there's a lot of posts on the subject.
I've searched a fair amount and found lots of information on it - mainly Ubuntu and attempted to interrupted them towards my install, unfortunately i’m struggling to get ZoneMinder full working, i’ve run into the problem of not seeing steamed images.

My platfrom is: CentOS Linux release 7.4.1708 (Core), ZoneMinder, v1.30.4.

I 've read the Readme & What’s new and attempted to carry our point 1:

What's New
==========

1. The Apache ScriptAlias has been changed from "/cgi-bin/zm/zms" to
"/cgi-bin-zm/zms". This has been to done to avoid this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=973067

IMPORTANT: You must manually verify the value of PATH_ZMS under Options.
Make sure it is set to "/cgi-bin-zm/nph-zms". Failure to do so will result
in a broken system. You have been warned.



I’ve assumed that the cgi-bin path is relating to httpd.conf located: etc/httpd/conf/httpd.conf 


The original locations were:

Code: Select all

    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    # 
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
&

Code: Select all

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

Have i interrupted the instructions correctly and updated them to:

Code: Select all

    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    # 
    ScriptAlias /cgi-bin/ "/usr/libexec/zoneminder/cgi-bin/zms/"
</IfModule>
&

Code: Select all

<Directory "/usr/libexec/zoneminder/cgi-bin/zms">
    AllowOverride None
    Options None
    Require all granted
</Directory>


The full error I’m seeing after restarts ( apachectl restart , systemctl restart zoneminder)

Socket /var/lib/zoneminder/sock/zms-628133s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit.


Within in the web interface and options, paths, PATH_ZMS i have: /cgi-bin/nph-zms

I’ve followed the advice on changing the PATH_ZMS to: /cgi-bin/zms from the link below as well.

http://zoneminder.readthedocs.io/en/lat ... window-etc


Any help is much appreciated as i’ve been going around and around trying to get it working.
Thanks
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by knight-of-ni »

PATH_ZMS & ScriptAlias settings are entirely distro dependent. If you are running CentOS then don't read posts on these topics from users running Ubuntu. That will only lead you down the wrong path.

The PATH_ZMS & ScriptAlias settings are set correctly out right out of the box for the zoneminder rpms found in rpmfusion (that is where you got zoneminder from, right?). If you change either of these, then you just broke it.

So first, put your system back to the way it was when you first installed ZoneMinder.

Once you have done that, we need to see more data which describes your system and the problem you are experiencing.

For starters, we need:
1) your entire log from the moment zoneminder is started until just after errors appear (there will be errors if there is no streaming)
2) we need to know what you entered into the General & Source tabs of the monitor config
3) make & model of camera(s) would help
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by knight-of-ni »

This was literally the first anything I posted to Youtube, and I really need to make a new one.

Watch the following video which shows how I install ZoneMinder on CentOS 6 in ~8 minutes (the steps for Centos 7 are the same). Key point to notice - I am literally copying the commands right out of the readme and pasting them into the commandline. That is all you need to do if you want to run with the default settings (recommended for first time users).

https://youtu.be/l2lLvl8WxfU?t=269
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
djs11
Posts: 3
Joined: Sun Feb 18, 2018 9:49 am

Re: CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by djs11 »

Thank's for the replies, unfortunately i followed the CentOS link from the downloads page (https://zoneminder.com/downloads/) which took me to the Red Hat documentation (https://zoneminder.readthedocs.io/en/st ... edhat.html) which had the link to zmrepo.zoneminder, i used this rpm: http://zmrepo.zoneminder.com/el/7/x86_6 ... noarch.rpm

I've just found the ink to rpm-fusion (http://zoneminder.readthedocs.io/en/lat ... rpm-fusion), what would my best next move be, a uninstall of zoneminder then follow the newer instructions for rpm-fusion ?

The YouTube video is what i did and it worked great, just the wrong repo! Was the wrong repo the reason why the readme told me to alter the Apache ScriptAlias when it wasn't needed?

Thanks for the help.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by knight-of-ni »

Right at the top of zmrepo.zoneminder.com, it says ZoneMinder releases were moved to rpmfusion, except for EL6.
I still push development packages to zmrepo, but for releases you should use rpmfusion.

In any case, switching to rpmfusion isn't difficult. You've already linked to the instructions that show you how to change from zmrepo to rpmfusion. http://zoneminder.readthedocs.io/en/lat ... rpm-fusion
Should be pretty straight forward.

Note that rpm typically will not overwrite config files if they have been manually edited. Since you mentioned this was done, keep an eye out for config files with an ".rpmsave" extension after you switch over to rpmfusion. Check /etc/zm and /etc/httpd/conf.d folders. You will want to use these instead of the manually edited config files.

Once you switch over to rpmfusion and have your configs set to their default settings, then provide the information requested previously if you experience any issues getting your cameras to work.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
djs11
Posts: 3
Joined: Sun Feb 18, 2018 9:49 am

Re: CentOS 7.4, v1.30.4 & CGI Binaries / ScriptAlias

Post by djs11 »

Great, thanks very much, will follow those instructions.
Locked