This PHP web app is a simple digital signage manager, used to display content on any kind of browser.
Based on the Yii2 framework. See https://github.com/jf-guillou/lcds/blob/master/composer.json for the complete list of extensions used in this project.
Table of contents
- PHP >= 7.0
- php-curl
- php-xml
- php-mbstring
- php-ldap
- Any php-pdo supported driver and associated database
- php-mysql with mariadb-server >= 10.0 preferably
- mediainfo -- extract media content-type and duration
- youtube-dl -- download media from video hosting sites
- Composer
apt-get install -y git php php-mbstring php-ldap php-mysql php-curl php-xml composer mariadb-server mediainfo
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
cd /var/www
git clone -b production https://github.com/jf-guillou/lcds.git
cd lcds
composer install --no-dev
Edit the database configuration file config/db.php
according to your settings.
Make sure to modify the
dbname=
,username
andpassword
.
Then run the migrations to pre-fill the database :
./yii migrate --interactive=0
Edit the app configuration file config/params.php
:
language
- Currently supported :en-US
fr-FR
prettyUrl
- See Enable pretty URLScookieValidationKey
- Should be automatically generated by composer, should not be modifiedproxy
- Outgoing proxy if necessary, used by media downloadersuseSSO
- If the web server is SSO enabled (CAS/Kerberos)ssoEnvUsername
- The HTTP environment variable containing the username from SSOuseLdap
- Use LDAP for authentication backendactiveDirectorySchema
- ActiveDirectory or OpenLDAP schemaldapOptions
- Common options for LDAP, default values should help you understand their meaningcookieDuration
- Cookie duration in seconds, 0 will disable cookiesweather
- Weather renderer configuration / See https://darksky.net/dev for more detailslanguage
- Summary text languageunits
- Temperature unitsapikey
- API key used to fetch weather statuswithSummary
- Display text summary alongside icon
The Yii2 framework document root is in the /web folder
DocumentRoot "/var/www/lcds/web"
Add to Apache configuration
<Directory "/var/www/lcds/web">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# ...other settings...
</Directory>
root /var/www/lcds/web;
Add to Nginx configuration
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
The app should be ready to use.
Default credentials are admin
/admin
Do not hesitate to report bugs by posting an issue at Github
cd /var/www/lcds
git pull
composer install --no-dev
./yii migrate --interactive=0
The client configuration mostly depends on the hardware you are going to use.
Basically, just set the homepage of the browser to your web server address with '/frontend' suffix
https://lcds-server/frontend
If you want to use a Raspberry Pi, here is the setup we use.