diff --git a/app/library/App/Service/InfluxDb.php b/app/library/App/Service/InfluxDb.php
index a206bc7aa..afff9ff69 100644
--- a/app/library/App/Service/InfluxDb.php
+++ b/app/library/App/Service/InfluxDb.php
@@ -184,7 +184,10 @@ class InfluxDb
throw new \Exception($message, $statusCode);
} else if ($statusCode == self::STATUS_CODE_OK) {
try {
- return $response->json();
+ if (!empty((string)$response->getBody()))
+ return $response->json();
+ else
+ return array();
} catch (ParseException $ex) {
throw new \Exception(
sprintf("%s; Response is '%s'", $ex->getMessage(), (string)$response->getBody()),
diff --git a/app/models/Entity/StationMedia.php b/app/models/Entity/StationMedia.php
index c622658e0..27ca365b5 100644
--- a/app/models/Entity/StationMedia.php
+++ b/app/models/Entity/StationMedia.php
@@ -2,7 +2,6 @@
namespace Entity;
use \Doctrine\Common\Collections\ArrayCollection;
-use \GetId3\GetId3Core as GetId3;
/**
* @Table(name="station_media", indexes={
@@ -114,12 +113,13 @@ class StationMedia extends \App\Doctrine\Entity
if ($media_mtime >= $this->mtime)
{
// Load metadata from MP3 file.
- $id3 = new GetId3();
+ $id3 = new \getID3();
- $file_info = $id3->setOptionMD5Data(true)
- ->setOptionMD5DataSource(true)
- ->setEncoding('UTF-8')
- ->analyze($media_path);
+ $id3->option_md5_data = true;
+ $id3->option_md5_data_source = true;
+ $id3->encoding = 'UTF-8';
+
+ $file_info = $id3->analyze($media_path);
if (isset($file_info['error']))
\App\Debug::log('Error processing file: '.$file_info['error']);
diff --git a/app/templates/main.phtml b/app/templates/main.phtml
index 5098cbc70..7f3a545f9 100644
--- a/app/templates/main.phtml
+++ b/app/templates/main.phtml
@@ -204,7 +204,8 @@ header("Content-type: text/html; charset=utf-8");
@@ -229,7 +230,7 @@ $this->assets->outputJs('footer_js');
diff --git a/composer.json b/composer.json
index 054f7555e..df322e549 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
"aws/aws-sdk-php": "3.*",
"phpoffice/phpexcel": "1.8.0",
"ise/php-soundcloud": "dev-master",
- "phansys/getid3": "~2.1@dev"
+ "james-heinrich/getid3": "~1.9"
},
"require-dev": {
"phalcon/devtools": "~3@dev"
diff --git a/composer.lock b/composer.lock
index cc76d25bb..00a6d15cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,21 +4,21 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "fca2e10d1f6100695c06bddcbea07298",
- "content-hash": "b6b73096c6732da2bc257b77718c959d",
+ "hash": "98a3c4a314b9a11c3898bb5ac6964571",
+ "content-hash": "7b197beedcc0e08d1b0420a743d4de84",
"packages": [
{
"name": "aws/aws-sdk-php",
- "version": "3.19.4",
+ "version": "3.19.6",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
- "reference": "f67bc37fa4b76d85423052eae2a9577aab99adc1"
+ "reference": "34060bf0db260031697b17dbb37fa1bbec92f1c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f67bc37fa4b76d85423052eae2a9577aab99adc1",
- "reference": "f67bc37fa4b76d85423052eae2a9577aab99adc1",
+ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/34060bf0db260031697b17dbb37fa1bbec92f1c4",
+ "reference": "34060bf0db260031697b17dbb37fa1bbec92f1c4",
"shasum": ""
},
"require": {
@@ -85,7 +85,7 @@
"s3",
"sdk"
],
- "time": "2016-09-01 21:37:32"
+ "time": "2016-09-08 20:27:15"
},
{
"name": "container-interop/container-interop",
@@ -1108,6 +1108,42 @@
],
"time": "2016-03-26 04:30:24"
},
+ {
+ "name": "james-heinrich/getid3",
+ "version": "v1.9.12",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/JamesHeinrich/getID3.git",
+ "reference": "41c05612d532d30f07680cad3a4a6efbec7fc7f5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/41c05612d532d30f07680cad3a4a6efbec7fc7f5",
+ "reference": "41c05612d532d30f07680cad3a4a6efbec7fc7f5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "getid3/getid3.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL"
+ ],
+ "description": "PHP script that extracts useful information from popular multimedia file formats",
+ "homepage": "http://www.getid3.org/",
+ "keywords": [
+ "codecs",
+ "php",
+ "tags"
+ ],
+ "time": "2016-03-02 13:13:30"
+ },
{
"name": "mtdowling/jmespath.php",
"version": "2.3.0",
@@ -1278,53 +1314,6 @@
"homepage": "https://nette.org",
"time": "2016-06-17 13:28:41"
},
- {
- "name": "phansys/getid3",
- "version": "2.1.x-dev",
- "source": {
- "type": "git",
- "url": "https://github.com/phansys/GetId3.git",
- "reference": "6d3f04b2781bb3d545fabfc4d1636c9bf5ac03f9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phansys/GetId3/zipball/6d3f04b2781bb3d545fabfc4d1636c9bf5ac03f9",
- "reference": "6d3f04b2781bb3d545fabfc4d1636c9bf5ac03f9",
- "shasum": ""
- },
- "require": {
- "php": "~5.3"
- },
- "suggest": {
- "ext-exif": "EXIF extension is required for graphic modules.",
- "ext-rar": "RAR extension is required for RAR archive module."
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "GetId3\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL"
- ],
- "authors": [
- {
- "name": "James Heinrich",
- "email": "info@getid3.org",
- "homepage": "http://www.getid3.org"
- }
- ],
- "description": "This fork of GetId3 library updates to PSR-2 / PSR-4 CS, adds namespaces and makes it installable by composer.",
- "homepage": "http://www.getid3.org",
- "keywords": [
- "getid3",
- "metadata",
- "tags"
- ],
- "time": "2015-06-28 12:06:17"
- },
{
"name": "phpoffice/phpexcel",
"version": "1.8.0",
@@ -1524,16 +1513,16 @@
},
{
"name": "symfony/console",
- "version": "v2.8.9",
+ "version": "v2.8.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "36e62335caca8a6e909c5c5bac4a8128149911c9"
+ "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/36e62335caca8a6e909c5c5bac4a8128149911c9",
- "reference": "36e62335caca8a6e909c5c5bac4a8128149911c9",
+ "url": "https://api.github.com/repos/symfony/console/zipball/3d3e4fa5f0614c8e45220e5de80332322e33bd90",
+ "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90",
"shasum": ""
},
"require": {
@@ -1580,7 +1569,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2016-07-30 07:20:35"
+ "time": "2016-09-06 10:55:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -2304,7 +2293,6 @@
"stability-flags": {
"google/apiclient": 10,
"ise/php-soundcloud": 20,
- "phansys/getid3": 20,
"phalcon/devtools": 20
},
"prefer-stable": false,
diff --git a/util/ansible/roles/php-phalcon/handlers/main.yml b/util/ansible/roles/php-phalcon/handlers/main.yml
index 69e7e5c97..bf5e50cfd 100644
--- a/util/ansible/roles/php-phalcon/handlers/main.yml
+++ b/util/ansible/roles/php-phalcon/handlers/main.yml
@@ -1,3 +1,3 @@
---
-- name: restart php5-fpm
- service: name=php5-fpm enabled=yes state=restarted
+- name: restart php-fpm
+ service: name=php7.0-fpm enabled=yes state=restarted
diff --git a/util/ansible/roles/php-phalcon/tasks/main.yml b/util/ansible/roles/php-phalcon/tasks/main.yml
index 3010132e2..67a4fd21e 100644
--- a/util/ansible/roles/php-phalcon/tasks/main.yml
+++ b/util/ansible/roles/php-phalcon/tasks/main.yml
@@ -1,11 +1,13 @@
---
- name: Add PHP PPA repository
become: true
- apt_repository: repo=ppa:ondrej/php5
+ apt_repository: repo=ppa:ondrej/php
- name: Add Phalcon PPA repository
become: true
- apt_repository: repo=ppa:phalcon/stable
+ shell: curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash
+ args:
+ warn: no
- name: Update apt again
become: true
@@ -15,20 +17,21 @@
become: true
apt: package="{{ item }}" state=latest
with_items:
- - php5-fpm
- - php5-cli
- - php5-gd
- - php5-mysqlnd
- - php5-curl
- - php5-phalcon
+ - php7.0-fpm
+ - php7.0-cli
+ - php7.0-gd
+ - php7.0-mysqlnd
+ - php7.0-curl
+ - php7.0-xml
+ - php7.0-phalcon
- name: Configure PHP FPM Pool
- template: src=fpmpool.j2 dest=/etc/php5/fpm/pool.d/www.conf force=true
- notify: restart php5-fpm
+ template: src=fpmpool.j2 dest=/etc/php/7.0/fpm/pool.d/www.conf force=true
+ notify: restart php-fpm
- - name: Configure php5-fpm php.ini
+ - name: Configure php-fpm php.ini
ini_file:
- dest: /etc/php5/fpm/php.ini
+ dest: /etc/php/7.0/fpm/php.ini
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"
@@ -36,11 +39,11 @@
- { option: 'post_max_size', value: "50M" }
- { option: 'short_open_tag', value: "On" }
- { option: 'upload_max_filesize', value: "25M" }
- notify: restart php5-fpm
+ notify: restart php-fpm
- - name: Configure php5-cli php.ini
+ - name: Configure php-cli php.ini
ini_file:
- dest: /etc/php5/cli/php.ini
+ dest: /etc/php/7.0/cli/php.ini
section: PHP
option: "{{ item.option }}"
value: "{{ item.value }}"