Skip to content

Configuration.php variable ( some are hidden )

Daniel Neto edited this page Oct 7, 2026 · 25 revisions

Settings in videos/configuration.php

Advanced (server access needed). The installer creates videos/configuration.php with the database connection and some basic settings. A few extra settings exist only in this file: you add them by hand. This page lists them.

The file contains your database password: never publish it, and make a copy before editing.

How to edit the file

sudo cp /var/www/html/AVideo/videos/configuration.php ~/configuration.php.backup
sudo nano /var/www/html/AVideo/videos/configuration.php

Add new lines above the last line (require_once $global['systemRootPath'] . 'objects/include_config.php';). Keep the ; at the end of each line. 0 means off, 1 means on. If the site shows a blank page after your change, copy the backup back: sudo cp ~/configuration.php.backup /var/www/html/AVideo/videos/configuration.php.

Settings written by the installer

Setting What it does
$mysqlHost, $mysqlPort, $mysqlUser, $mysqlPass, $mysqlDatabase Database connection
$global['webSiteRootURL'] Public address of the site, with the final /, for example 'https://video.example.com/'. See Change the URL of your installation.
$global['systemRootPath'] Folder of the installation on the server, with the final /, for example '/var/www/html/AVideo/'
$global['salt'], $global['saltV2'] Secret values used for passwords and security tokens. Never change or share them: users could no longer sign in. saltV2 is added automatically if missing.
$global['disableAdvancedConfigurations'] 1 locks advanced administration: hides the Advanced Configuration tab, blocks plugin uploads and plugin parameter editing, and blocks ZIP uploads. Default 0.
$global['videoStorageLimitMinutes'] Maximum total duration (in minutes) of all videos on the site. New uploads are refused when the limit is reached. 0 = no limit (default).
$global['disableTimeFix'] 1 stops AVideo from switching PHP to the visitor's time zone (or the time zone chosen in CustomizeAdvanced). Default 0.
$global['logfile'] AVideo log file. Default videos/avideo.log in your installation folder.
$global['enableDDOSprotection'] 1 (default) slows down a visitor who sends too many requests in a short time.
$global['ddosMaxConnections'] Requests allowed within ddosSecondTimeout before slowing down. Default 40.
$global['ddosSecondTimeout'] Time window, in seconds. Default 5.
$global['strictDDOSprotection'] 1 also stops the request (instead of only slowing it). Default 0.
$global['noDebug'] 1 writes fewer debug and performance messages to the log. Default 0.
$global['configurationVersion'], $global['webSiteRootPath'] Written by the installer. Leave them as they are.

Optional settings you can add

Setting What it does
$global['rowCount'] = 100; Default number of items per page when a page does not ask for a specific number.
$global['limitForUnlimitedVideos'] = 100; Maximum number of videos returned by a list that has no page size. If not set, AVideo uses 100 (or rowCount, or 1000, depending on the list). -1 removes the limit.
$global['mysqli_charset'] = 'utf8mb4'; Character set of the database connection. Default utf8mb4 (supports emoji). Change it only for a very old database.
$global['disableVideoTags'] = 1; Hides the small labels (tags) that plugins add to videos, such as the resolution, and stops reading the resolution from video files. Can make the home page faster, mainly with remote storage.
$global['getUsageFromFilename'] = 1; Skips scanning video files to calculate disk usage.
$global['stopBotsList'] = array('bot', 'spider', 'crawler'); Blocks visitors whose browser name (user agent) contains one of these words. Careful: bot also blocks search engines unless you whitelist them below.
$global['stopBotsWhiteList'] = array('google', 'bing', 'yahoo', 'yandex'); Bots that are never blocked by stopBotsList.
$global['ignoreCDN'] = 1; Serves files from the site itself instead of the CDN address.
$global['tmpDir'] = '/path/to/tmp/'; Temporary folder for AVideo. If not set, AVideo uses /var/www/tmp/ when it is writable, otherwise its cache folder.
$global['ignoreAllCache'] = 1; Disables AVideo's cache. Use only to test a problem: the site becomes slower.
$global['ob_start_callback'] = false; Turns off AVideo's PHP output compression (gzip).
$global['failedLoginMaxPerAccount'] = 10; Failed sign-ins allowed per account and IP address within 15 minutes before sign-in is blocked for a while. Default 10.
$global['failedLoginMaxPerIP'] = 100; Failed sign-ins allowed per IP address within 15 minutes. Default 100.
$global['trustedProxies'] = array('10.0.0.5'); Use it when visitors reach AVideo through your own reverse proxy or load balancer. List the exact IP addresses of those proxies (ranges are not accepted). Only for requests from these addresses does AVideo read the visitor's real IP from the X-Real-IP / X-Forwarded-For headers; otherwise every visitor seems to come from the proxy, which affects sign-in limits, statistics and location features. Not set by default.

Save the file. The change applies on the next page load; if a page still shows the old behavior, clear the cache in Site Configurations, tab Advanced Configuration, button Clear Cache Directory.

Clone this wiki locally