I had to update perl/apache/mysql after changing the hardware in my server. I also recompiled zoneminder, and now when i try to start it i get:
webcam / # zmpkg.pl start
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 133.
Bareword "ZM_OPT_FRAME_SERVER" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 262.
Bareword "ZM_OPT_CONTROL" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 274.
Bareword "ZM_OPT_X10" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 290.
Bareword "ZM_CHECK_FOR_UPDATES" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 295.
Execution of /usr/bin/zmpkg.pl aborted due to compilation errors.
any idea?
Problem after recompilation
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
after some research it seems to be related to mysql 5... when the scripts populate the constants, the select from the config table doesnt seem to return them all, heres what i get from this piece of code:
while( my @config = $sth->fetchrow_array() )
{
print "Config name: @config[1]\n";
*{@config[1]} = sub { @config[2] };
}
note: i changed fetchrow_hashref to array for testing purpose
heres the result from running zmpkg.pl:
Config name: ZM_LANG_DEFAULT
Config name: ZM_OPT_USE_AUTH
Config name: ZM_AUTH_TYPE
Config name: ZM_AUTH_RELAY
Config name: ZM_AUTH_HASH_SECRET
Config name: ZM_AUTH_HASH_IPS
Config name: ZM_DIR_EVENTS
Config name: ZM_DIR_IMAGES
Config name: ZM_DIR_SOUNDS
Config name: ZM_PATH_ZMS
Config name: ZM_CAN_STREAM
Config name: ZM_RAND_STREAM
Config name: ZM_OPT_CAMBOZOLA
Config name: ZM_PATH_CAMBOZOLA
Config name: ZM_TIMESTAMP_ON_CAPTURE
Config name: ZM_LOCAL_BGR_INVERT
Config name: ZM_Y_IMAGE_DELTAS
Config name: ZM_FAST_IMAGE_BLENDS
Config name: ZM_COLOUR_JPEG_FILES
Config name: ZM_JPEG_FILE_QUALITY
Config name: ZM_JPEG_IMAGE_QUALITY
Config name: ZM_BLEND_ALARMED_IMAGES
Config name: ZM_NO_MAX_FPS_ON_ALARM
Config name: ZM_OPT_ADAPTIVE_SKIP
Config name: ZM_OPT_REMOTE_CAMERAS
Config name: ZM_NETCAM_REGEXPS
Config name: ZM_HTTP_VERSION
Config name: ZM_HTTP_UA
Config name: ZM_HTTP_TIMEOUT
Config name: ZM_OPT_MPEG
Config name: ZM_PATH_MPEG_ENCODE
Config name: ZM_PATH_FFMPEG
Config name: ZM_FFMPEG_INPUT_OPTIONS
Config name: ZM_FFMPEG_OUTPUT_OPTIONS
Config name: ZM_FFMPEG_FORMATS
Config name: ZM_OPT_NETPBM
Config name: ZM_PATH_NETPBM
Config name: ZM_OPT_TRIGGERS
Config name: ZM_EXTRA_DEBUG
Config name: ZM_EXTRA_DEBUG_TARGET
Config name: ZM_EXTRA_DEBUG_LEVEL
Config name: ZM_EXTRA_DEBUG_LOG
Config name: ZM_PATH_SOCKS
Config name: ZM_PATH_LOGS
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 134.
Bareword "ZM_OPT_FRAME_SERVER" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 263.
Bareword "ZM_OPT_CONTROL" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 275.
Bareword "ZM_OPT_X10" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 291.
Bareword "ZM_CHECK_FOR_UPDATES" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 296.
Execution of /usr/bin/zmpkg.pl aborted due to compilation errors.
while( my @config = $sth->fetchrow_array() )
{
print "Config name: @config[1]\n";
*{@config[1]} = sub { @config[2] };
}
note: i changed fetchrow_hashref to array for testing purpose
heres the result from running zmpkg.pl:
Config name: ZM_LANG_DEFAULT
Config name: ZM_OPT_USE_AUTH
Config name: ZM_AUTH_TYPE
Config name: ZM_AUTH_RELAY
Config name: ZM_AUTH_HASH_SECRET
Config name: ZM_AUTH_HASH_IPS
Config name: ZM_DIR_EVENTS
Config name: ZM_DIR_IMAGES
Config name: ZM_DIR_SOUNDS
Config name: ZM_PATH_ZMS
Config name: ZM_CAN_STREAM
Config name: ZM_RAND_STREAM
Config name: ZM_OPT_CAMBOZOLA
Config name: ZM_PATH_CAMBOZOLA
Config name: ZM_TIMESTAMP_ON_CAPTURE
Config name: ZM_LOCAL_BGR_INVERT
Config name: ZM_Y_IMAGE_DELTAS
Config name: ZM_FAST_IMAGE_BLENDS
Config name: ZM_COLOUR_JPEG_FILES
Config name: ZM_JPEG_FILE_QUALITY
Config name: ZM_JPEG_IMAGE_QUALITY
Config name: ZM_BLEND_ALARMED_IMAGES
Config name: ZM_NO_MAX_FPS_ON_ALARM
Config name: ZM_OPT_ADAPTIVE_SKIP
Config name: ZM_OPT_REMOTE_CAMERAS
Config name: ZM_NETCAM_REGEXPS
Config name: ZM_HTTP_VERSION
Config name: ZM_HTTP_UA
Config name: ZM_HTTP_TIMEOUT
Config name: ZM_OPT_MPEG
Config name: ZM_PATH_MPEG_ENCODE
Config name: ZM_PATH_FFMPEG
Config name: ZM_FFMPEG_INPUT_OPTIONS
Config name: ZM_FFMPEG_OUTPUT_OPTIONS
Config name: ZM_FFMPEG_FORMATS
Config name: ZM_OPT_NETPBM
Config name: ZM_PATH_NETPBM
Config name: ZM_OPT_TRIGGERS
Config name: ZM_EXTRA_DEBUG
Config name: ZM_EXTRA_DEBUG_TARGET
Config name: ZM_EXTRA_DEBUG_LEVEL
Config name: ZM_EXTRA_DEBUG_LOG
Config name: ZM_PATH_SOCKS
Config name: ZM_PATH_LOGS
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 134.
Bareword "ZM_OPT_FRAME_SERVER" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 263.
Bareword "ZM_OPT_CONTROL" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 275.
Bareword "ZM_OPT_X10" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 291.
Bareword "ZM_CHECK_FOR_UPDATES" not allowed while "strict subs" in use at /usr/bin/zmpkg.pl line 296.
Execution of /usr/bin/zmpkg.pl aborted due to compilation errors.
strangest things.. i fixed the constant problems by converting the mysql query to this:
all the scripts start without any error, and zm is in running state
now the thing is, no monitors actually start, they are all red
when i open zmaudit.pl i get:
Code: Select all
use DBI;
my $dbh = DBI->connect( "DBI:mysql:database=".&ZM_DB_NAME.";host=".&ZM_DB_SERVER, &ZM_DB_USER, &ZM_DB_PASS );
my $sql = "SELECT name,value FROM Config";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
while( my @config = $sth->fetchrow_array() )
{
*{$config[0]} = sub { $config[1] };
}
$sth->finish();
$dbh->disconnect();
now the thing is, no monitors actually start, they are all red
when i open zmaudit.pl i get:
Code: Select all
12/07/05 15:53:04.695946 zmaudit[19460].DBG [Found database monitor '1']
12/07/05 15:53:04.696408 zmaudit[19460].DBG [Got 0 events]
12/07/05 15:53:04.696552 zmaudit[19460].DBG [Found database monitor '2']
12/07/05 15:53:04.696738 zmaudit[19460].DBG [Got 0 events]
12/07/05 15:53:04.696846 zmaudit[19460].DBG [Found database monitor '4']
12/07/05 15:53:04.696995 zmaudit[19460].DBG [Got 0 events]
12/07/05 15:53:04.697098 zmaudit[19460].DBG [Found database monitor '7']
12/07/05 15:53:04.697245 zmaudit[19460].DBG [Got 0 events]
12/07/05 15:53:04.697350 zmaudit[19460].DBG [Found database monitor '8']
12/07/05 15:53:04.697495 zmaudit[19460].DBG [Got 0 events]
12/07/05 15:53:04.697601 zmaudit[19460].DBG [Found database monitor '10']
Segmentation fault
Code: Select all
webcam tmp # zmaudit.pl -d 900 -y
Segmentation fault
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: