broken debian upgrade to 1.32: Constant ZM_DIR_EVENTS already defined
Posted: Mon Dec 09, 2019 6:28 pm
After an upgrade from hell due to the php5 to php7 forced migration that broke so many things (sigh), I upgraded zoneminder too, since my old one worked with php5 and now I'm forced to have php7 in apache due to other packages.
I'm now stuck at the zoneminder privacy accept screen, and accept loops and goes nowhere.
I see this in my logs:
This points to a broken upgrade and maybe files left over from my old package (normally debian would handle this, but it seems not in this case). Here's what I see:
Any idea of what doesn't belong there? It seems that I have one file left over that I should delete, but I'm also confused about "Use of undefined constant ZM_BANDWIDTH_DEFAULT in /usr/share/zoneminder/www/skins/classic/skin.php " errors, which seem to point to another incomplete install issue?
Seems that said file is from the package I just installed, and not a leftover:
gargamel:/usr/share/zoneminder# dpkg -S /usr/share/zoneminder/www/skins/classic/skin.php
zoneminder: /usr/share/zoneminder/www/skins/classic/skin.php
Any ideas? Thanks, Marc
I'm now stuck at the zoneminder privacy accept screen, and accept loops and goes nowhere.
I see this in my logs:
Code: Select all
PHP Notice: Constant ZM_DIR_EVENTS already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_DIR_IMAGES already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_DIR_SOUNDS already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_ZMS already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_MAP already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_SOCKS already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_LOGS already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_SWAP already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Constant ZM_PATH_ARP already defined in /usr/share/zoneminder/www/includes/config.php on line 173, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Use of undefined constant ZM_BANDWIDTH_DEFAULT - assumed 'ZM_BANDWIDTH_DEFAULT' in /usr/share/zoneminder/www/skins/classic/skin.php on line 22, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Use of undefined constant ZM_AUTH_HASH_TTL - assumed 'ZM_AUTH_HASH_TTL' in /usr/share/zoneminder/www/includes/auth.php on line 117, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Use of undefined constant ZM_SHOW_PRIVACY - assumed 'ZM_SHOW_PRIVACY' in /usr/share/zoneminder/www/index.php on line 232, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Use of undefined constant ZM_WEB_AJAX_TIMEOUT - assumed 'ZM_WEB_AJAX_TIMEOUT' in /usr/share/zoneminder/www/skins/classic/js/skin.js.php on line 27, referer: https://home.merlins.org/zm/index.php?view=console
PHP Notice: Use of undefined constant ZM_WEB_REFRESH_NAVBAR - assumed 'ZM_WEB_REFRESH_NAVBAR' in /usr/share/zoneminder/www/skins/classic/js/skin.js.php on line 29, referer: https://home.merlins.org/zm/index.php?view=console
This points to a broken upgrade and maybe files left over from my old package (normally debian would handle this, but it seems not in this case). Here's what I see:
Code: Select all
gargamel:/usr/share/zoneminder# grep -r ZM_DIR_EVENTS .
./www/includes/Event.php: # A default Server will result in the use of ZM_DIR_EVENTS
./www/includes/Monitor.php: deletePath(ZM_DIR_EVENTS.'/'.basename($this->{'Name'}));
./www/includes/Monitor.php: deletePath(ZM_DIR_EVENTS.'/'.$this->{'Id'});
./www/includes/Monitor.php: if ( $Storage->Path() != ZM_DIR_EVENTS ) {
./www/includes/Storage.php: $path = ZM_DIR_EVENTS;
./www/includes/Storage.php: $this->{'Path'} = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS;
./www/includes/Storage.php: $this->{'Path'} = ZM_DIR_EVENTS;
./www/includes/functions.php: } elseif ( strpos( ZM_DIR_EVENTS, '/' ) === 0 ) {
./www/includes/functions.php: return( ZM_DIR_EVENTS.'/'.$path );
./www/includes/functions.php:function getDiskPercent($path = ZM_DIR_EVENTS) {
./www/views/image.php: $dir_events = realpath(ZM_DIR_EVENTS);
./www/api/app/Controller/Component/ImageComponent.php: $analFile = $config['ZM_DIR_EVENTS']."/".$analPath;
./www/api/app/Controller/Component/ImageComponent.php: $imageFile = $config['ZM_DIR_EVENTS']."/".$imagePath;
./www/api/app/Controller/Component/ImageComponent.php: $thumbFile = $config['ZM_DIR_EVENTS']."/".$thumbPath;
./www/api/app/Controller/Component/ImageComponent.php: $imageFile = $config['ZM_DIR_EVENTS']."/".$imagePath;
./www/api/app/Controller/Component/ImageComponent.php: //$thumbFile = ZM_DIR_EVENTS."/".$thumbPath;
./www/api/app/Controller/EventsController.php: 'ZM_DIR_EVENTS'
./www/api/app/Controller/HostController.php: $zm_dir_events = ZM_DIR_EVENTS;
./www/api/app/Controller/UsersController.php: 'conditions' => array('Name' => array('ZM_DIR_EVENTS'))
./www/skins/classic/includes/export_functions.php: $monitorPath = ZM_DIR_EVENTS.'/';
./www/skins/classic/includes/functions.php: if ( ! isset($storage_paths[ZM_DIR_EVENTS]) ) {
./www/skins/classic/views/filter.php://$storageareas[0] = 'Default ' . ZM_DIR_EVENTS;
./www/skins/classic/views/video.php: <h3 id="videoFile"><?php echo substr($videoFiles[$showIndex], strlen(ZM_DIR_EVENTS)+1) ?></h3>
./www/skins/classic/views/video.php: <td><?php echo makePopupLink('?view='.$view.'&eid='.$event['Id'].'&width='.$width.'&height='.$height.'&showIndex='.$index, 'zmVideo'.$event['Id'].'-'.$scale, array( 'videoview', $width, $height ), translate('View') ); ?> / <a href="<?php echo substr( $file, strlen(ZM_DIR_EVENTS)+1 ) ?>" onclick="downloadVideo( <?php echo $index ?> ); return( false );"><?php echo translate('Download') ?></a> / <a href="#" onclick="deleteVideo( <?php echo $index ?> ); return( false );"><?php echo translate('Delete') ?></a></td>
./www/index.php:if ( !is_writable(ZM_DIR_EVENTS) || !is_writable(ZM_DIR_IMAGES) ) {
./www/index.php: Warning("Cannot write to content dirs('".ZM_DIR_EVENTS."','".ZM_DIR_IMAGES."'). Check that these exist and are owned by the web account user");
Seems that said file is from the package I just installed, and not a leftover:
gargamel:/usr/share/zoneminder# dpkg -S /usr/share/zoneminder/www/skins/classic/skin.php
zoneminder: /usr/share/zoneminder/www/skins/classic/skin.php
Any ideas? Thanks, Marc