Commit a4f207a9 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

Improve installation

parent 5f90deef
......@@ -13,7 +13,7 @@ Installation
-------------
* Download from GitHub and unzip
* Edit ./sys/db.config.sample.php, enter identification to your MySQL or MariaDB server and save the file as ./sys/db.config.php
* If you want the recordings stored in mp3 format on the server, libavtools >=9 must be installed and the $conversion variable initialization uncommented in ./sys/config
* Edit ./sys/config.sample.php, enter identification to your MySQL or MariaDB server and save the file as ./sys/config.php
* If you want the recordings stored in mp3 format on the server, libavtools >=9 must be installed and the $conversion variable initialization adjusted in ./sys/config
* Run initializeDB.php
* You're good to go
......@@ -7,8 +7,8 @@ $ext = ".mp3";
//script pour supprimer le fichier sur le serveur
if (isset($_POST['delete-file'])) {
$fileName = 'enregistrements/'.$_POST['delete-file'];
if(isset($conversion)){
if($conversion!==false){
//#format
if(!unlink($fileName.'.mp3')) {
echo $fileName;
echo(' problem deleting files.');
......
......@@ -25,7 +25,11 @@ foreach(array('audio') as $type) {
// convertit en mp3
if(isset($conversion)){
if($conversion!==false){
//#format
if($conversion=="mp3"){
$conversion = "avconv -i %source% -acodec libmp3lame -q:a 2 -ac 1 %target%";
}
$commande = audio_convert($conversion, $file['filename']);
exec($commande);
// Supression du fichier.wav du serveur.
......
<?php
require_once("./sys/db.config.php"); //dirty hack to correct some dirtiness…
$dbhost = 'localhost';
$dbuser = 'GoW';
$dbpasswd = 'mAz7MQj';
$dbname = 'GoW';
/*Il faut enlever les commantaires à cette variable si sur le serveur
une version de libav-tools >= 9 est installée*/
//$conversion = "avconv -i %source% -acodec libmp3lame -q:a 2 -ac 1 %target%";
//$conversion = false;
$conversion = "mp3";
?>
<?php
$dbhost = 'localhost'; //host
$dbuser = 'The name of the user';
$dbpasswd = "The user's password";
$dbname = 'The name of the database';
/*Il faut enlever les commantaires à cette variable si sur le serveur
une version de libav-tools >= 9 est installée*/
//$conversion = false;
$conversion = "mp3";
?>
......@@ -22,7 +22,7 @@ class db
public function connect()
{
$dbhost = $dbuser = $dbpasswd = $dbname = '';
include(realpath(dirname(__FILE__) . '/db.config.php'));
include(realpath(dirname(__FILE__) . '/config.php'));
$this->handler = new mysqli($dbhost, $dbuser, $dbpasswd, $dbname);
if ( $this->handler->connect_error )
{
......
<?php
$dbhost = 'localhost';
$dbuser = 'GoW';
$dbpasswd = 'mAz7MQj';
$dbname = 'GoW';
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment