Installed Constants

When you install this application, a number of files containing various constants are created based on the answers to the questions the install script asked.

Most constants are stored in the PHP file Config/Constants.inc. This provides constant values for directories, user names etc. both for the web application and for all of the Perl scripts.

There are some other files created, some of which have to be protected from casual viewing because they contain the MySQL password of the QuartzPVR database. The full pathname of the files, as installed on this system are:

Config/Constants.inc

Location

%PVR_ROOT%/php/Config/Constants.inc

Description

Contains most of the constants/settings used by the web application and the Perl scripts. You may adjust some of these settings to change the behaviour of the application.

Contents

PVR_USER

The Linux user to use for Quartz PVR Perl scripts. Set to %PVR_USER%

PVR_GROUP

The primary group of the Linux user used for Quartz PVR. Set to %PVR_GROUP%

PVR_HOME

The home directory of the Linux user used for Quartz PVR. Set to %PVR_HOME%

PVR_LOGDIR

Main logging directory to use for logging Perl script output. Set to %PVR_LOGDIR%

MAIL_TO

The mail account that the Perl scripts will send any run errors to. Set to %MAIL_TO%

DATABASE

The MySQL database name. Set to %DATABASE%

PVR_ROOT

The top-level directory under which the web application is installed. Set to %PVR_ROOT%

DVBT_FREQFILE

The frequency file to use with the dvbt-scan script when setting up the DVB-T initial tuning. Set to %DVBT_FREQFILE%

VIDEO_DIR

Top-level directory for recording videos. Video files will be stored in sub-directories under this directory. Set to %VIDEO_DIR%

AUDIO_DIR

Top-level directory for recording audio. Audio files will be stored in sub-directories under this directory. Set to %AUDIO_DIR%

VIDEO_TRASH

During recording, various temporary video files are created and then removed. By default the "deleted" files are moved to this trashcan location. A cron job is set up in the QUARTZPVR user's crontab which deletes trash files after a week. This is done to ensure you always have access to the raw recording just in case the file left in the video directory is not playable (allows for re-processing the original). Set to %VIDEO_TRASH%

VIDEO_PATH

Recorded video file will be stored with this full pathname. Obviously the filename must contain variables otherwise every recording will overwrite the previous recording. Set to %VIDEO_PATH%

AUDIO_PATH

Recorded audio file will be stored with this full pathname. Set to %AUDIO_PATH%

SERVER_PORT

The TCP port number to be used by the Quartz PVR server (which interfaces requests from the web application to the Perl scheduling script). Set to %SERVER_PORT%

ADAPTERS

Space separated list of the DVB-T/T2 adapter numbers to use (leave blank for default). This can be used to keep one or more adapter unused by the PVR (e.g. so that it is available for testing purposes). Also, if you use udev to number your adapters in a fixed manner, you can specify that the PVR use those fixed numbers (rather than the random set generated on boot up). Set to %ADAPTERS%

ADSKIP

Advert removal control: 1=remove adverts, 0=do not remove adverts. Set to %ADSKIP%

PHP_SEARCH

If this flag is set, then the scripts search all PHP library code defined in php.ini and add any variables found into the PVR namespace (PHP and Perl). This would allow you to set extra variables that could then be used in the scripts. However, this is more likely to cause namespace clashes and prevent the PVR from running. Set to %PHP_SEARCH%

PHP_LOG

Debug: Log file to use for PHP application. Default is no log file specified so no logging is done. Note: You are responsible for ensuring the directory is writable by the web server. Set to '%PHP_LOG%'

SERVER_DEBUG

Debug: Level of server debug logging. Debug logs will be stored in /var/log/quartzpvr-server.log. Set to %SERVER_DEBUG%

DATE_TZ

The date timezone setting for the PHP application. Set to %DATE_TZ%

Config/SqlConstants.inc

Location

%PVR_ROOT%/php/Config/SqlConstants.inc

Description

Contains the MySQL username and password for the Quartz PVR database.

Access

This is only readable by root or the web server.

Config/PHP/Install.pm

Location

%perl_lib%/Linux/DVB/DVBT/Apps/QuartzPVR/Config/PHP/Install.pm

Description

Contains the full path to the web application to allow the Perl scripts access.

Config/SqlConstants.pm

Location

%perl_lib%/Linux/DVB/DVBT/Apps/QuartzPVR/Config/SqlConstants.pm

Description

Contains the MySQL username and password for the Quartz PVR database.

Access

This is only readable by root or the Quartz PVR Linux user.