MediaHub is a video/audio aggregator for educational institutions, and is currently running at http://mediahub.unl.edu/
cp config.sample.php config.inc.php
cp www/sample.htaccess www/.htaccess
config.inc.php
be sure to:UNL_MediaHub_Controller::$url
to base absolute URL of the application, with a trailing slashUNL_MediaHub::$dsn
to the proper DSN for the database. Format: mysql://username:password@localhost/databaseUNL_MediaHub_AuthService::$provider
to the desired auth service. See User Auth section below..htaccess
be sure to:Change RewriteBase /
to the correct path. If mediahub is accessed from example.com, the path would be /
. If it is accessed from example.com/mediahub/www/
the path would be /mediahub/www/
.
From commandline, run the following command: composer install
to download and install packages used by mediahub
From commandline, run php upgrade.php
to initialize the database. Run this command whenever the application is updated.
Create the www/uploads/tmp
directory if it does not already exist.
Assign proper permissions to allow the web server to write to those directories. For development, the following commands should be fine.
chmod 777 www/uploads
chmod 777 www/uploads/posters
chmod 777 www/uploads/tmp
Install the wdn
directory to www/wdn
for the latest include files.
This can be done with a symlink like ln -s /abolute-path-to-wdn-dir www/wdn
brew install mediainfo
or a similar commandOnce installed, run this command from the project root:
php vendor/bin/phpunit --bootstrap tests/init.php tests
Versioning is handled with git, so the application MUST be checkout out with git for this to work
To update the version cache (which is used for cachebusting) run php scripts/update_version.php
To automate this, git hooks can be used.
symlink the sample file update-version.sh
From the directory .git/hooks
run the following
ln -s ../../update-version.sh post-checkout
You may even want to have it triggered after post-merge (git pull)
ln -s ../../update-version.sh post-merge
MediaHub currently supports UNL PHP CAS or Apache mod_shib by setting UNL_MediaHub_AuthService::$provider
in config.inc.php
UNL_MediaHub_AuthService::$provider = new UNL_MediaHub_AuthService_UNL();
$shibSettings = array (
'shibLoginURL' => 'https://localhost/Shibboleth.sso/Login',
'shibLogoutURL' => 'https://localhost/Shibboleth.sso/Logout',
'appBaseURL' => UNL_MediaHub_Controller::$url,
'userAttributes' => array(
'eduPersonAssurance',
'eduPersonScopedAffiliation',
'eduPersonAffiliation',
'sn',
'givenName',
'surname',
'email',
'displayName',
'eduPersonPrincipalName'
)
);
UNL_MediaHub_AuthService::$provider = new UNL_MediaHub_AuthService_ModShib($shibSettings);