Monitor Functions
Monitor Functions
An old problem I had in changing the Function of a Monitor to something other than None (eg. Mocord, Modect etc.) is still occurring in latest release. The problem seems to be that the output of the call to foreach ( getEnumValues( 'Monitors', 'Function' ) as $opt_function )
line 516 in zm_html_view_monitor.php is producing names with trailiing backslashes eg Mocord\ , Modect\ etc.
Changing this to a simple array constant seems to fix the problem but why is it occurring in the first place ? The contents of the DB don't have trailing backslashes.
line 516 in zm_html_view_monitor.php is producing names with trailiing backslashes eg Mocord\ , Modect\ etc.
Changing this to a simple array constant seems to fix the problem but why is it occurring in the first place ? The contents of the DB don't have trailing backslashes.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Monitor Functions
I believe it is version 5.024a. I have the same problem with an older version too. I compiled the 5.024 from sources.
Seems the php function preg_match_all() in getEnumValues() is given strings containing backslashes before the quotes. You can fix it by stripping the backslashes out of $enum_values. I don't know why they are there however. Might be something to do with php configuration?
Seems the php function preg_match_all() in getEnumValues() is given strings containing backslashes before the quotes. You can fix it by stripping the backslashes out of $enum_values. I don't know why they are there however. Might be something to do with php configuration?
Monitor Functions
Haven't had time to test it but looks like magic_quotes_runtime=On in php.ini is the problem. Unless you can override this setting at runtime eg. init_set(magic_quotes_runtime,0) without affecting other applications perhaps changing getEnumValues() is desirable.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Yes, that may be it. Magic quotes are nearly always off nowadays so there's not many systems where this might happen, I think you must be the first!
Although I think you can override it with ini_set I think it's probably easier just to put in .htaccess in your zm dir. You will need to check that your apache is set up to allow htaccess files to override this setting as well of course.
Although I think you can override it with ini_set I think it's probably easier just to put
Code: Select all
php_value magic_quotes_gpc "Off"
Phil
Monitor Functions
Sounds good. I gave up on this system the first time I looked at it & that was all that was wrong. Limitations with Motion led to my having another go.
Don't suppose anyone can tell me where to get the X10 components from?
Don't suppose anyone can tell me where to get the X10 components from?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Monitor Functions
I'm after the X10::ActiveHome I think. Whatever is needed to get ZM to build with X10 enabled.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do
Code: Select all
perl -MCPAN -eshell
install X10:ActiveHome
quit
Phil
Monitor Functions
Thanks, but this method of accessing cpan doesn't usually work for me.
--------------------------------------------------
eg.
Trying with "/usr/bin/lynx -source" to get
http://cpan.mirrors.ilisys.com.au/modul ... st.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Warning: Cannot install X10:ActiveHome, don't know what it is.
Try the command
i /X10:ActiveHome/
to find objects with matching identifiers.
----------------------------------------------------
I think the url is http://search.cpan.org/src/ROBF/X10-0.0 ... iveHome.pm ?
Never mind, got it: but what about version 10-0.05 ?
--------------------------------------------------
eg.
Trying with "/usr/bin/lynx -source" to get
http://cpan.mirrors.ilisys.com.au/modul ... st.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Warning: Cannot install X10:ActiveHome, don't know what it is.
Try the command
i /X10:ActiveHome/
to find objects with matching identifiers.
----------------------------------------------------
I think the url is http://search.cpan.org/src/ROBF/X10-0.0 ... iveHome.pm ?
Never mind, got it: but what about version 10-0.05 ?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: