From 84985f73a3bf27af1bee880767b5e4771583f6f7 Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Mon, 18 Apr 2016 10:49:31 +0200 Subject: [PATCH 1/4] Fix for bad EXIF data read errors --- php/Modules/Photo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/Modules/Photo.php b/php/Modules/Photo.php index dc4a9c7..8870307 100755 --- a/php/Modules/Photo.php +++ b/php/Modules/Photo.php @@ -741,7 +741,7 @@ final class Photo { $return['focal'] = ''; $return['takestamp'] = 0; $return['lens'] = ''; - $return['tags'] = array(); + $return['tags'] = ''; $return['position'] = ''; $return['latitude'] = ''; $return['longitude'] = ''; @@ -783,7 +783,7 @@ final class Photo { } // Read EXIF - if ($info['mime']=='image/jpeg') $exif = exif_read_data($url, 'EXIF', 0); + if ($info['mime']=='image/jpeg') $exif = @exif_read_data($url, 'EXIF', false, false); else $exif = false; // EXIF Metadata From aa0209afeff188a6574173bb3be70057402d9c74 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Sun, 24 Apr 2016 16:07:55 +0200 Subject: [PATCH 2/4] Fix error 500 on database connect error If `$connection===false` it obviously has no properties. --- php/Modules/Database.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/php/Modules/Database.php b/php/Modules/Database.php index 2df65dc..d194cdc 100755 --- a/php/Modules/Database.php +++ b/php/Modules/Database.php @@ -56,7 +56,7 @@ final class Database { $connection = self::connect($host, $user, $password); // Check if the connection was successful - if ($connection===false) Response::error($connection->connect_error); + if ($connection===false) Response::error(self::connect_error()); if (self::setCharset($connection)===false) Response::error('Could not set database charset!'); @@ -90,6 +90,13 @@ final class Database { } + /** + * @return string Returns the string description of the last connect error + */ + public static function connect_error() { + return mysqli_connect_error(); + } + /** * @return boolean Returns true when successful. */ From d94960d996d1afc49277cd0b9dae76c20ae5b1f4 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 24 Apr 2016 16:24:48 +0200 Subject: [PATCH 3/4] Made connect_error a private function #530 --- php/Modules/Database.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/php/Modules/Database.php b/php/Modules/Database.php index d194cdc..11afdff 100755 --- a/php/Modules/Database.php +++ b/php/Modules/Database.php @@ -93,8 +93,10 @@ final class Database { /** * @return string Returns the string description of the last connect error */ - public static function connect_error() { + private static function connect_error() { + return mysqli_connect_error(); + } /** From cd9ce7ec834f75f957af83f968e59f297c64e43e Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Mon, 25 Apr 2016 20:45:11 +0200 Subject: [PATCH 4/4] Updated outdated PHP version --- docs/FAQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 68bbc20..5f7fc49 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -2,10 +2,10 @@ If Lychee is not working properly, try to open `plugins/Diagnostics/index.php`. This script will display all errors it can find. #### What do I need to run Lychee on my server? -To run Lychee, everything you need is a web-server with PHP 5.3 or later and a MySQL-Database. +To run Lychee, everything you need is a web-server with PHP 5.5 or later and a MySQL-Database. #### I can't upload photos -If you experience problems uploading large photos, you might want to change the PHP parameters in `.htaccess` (if you are using the PHP Apache module) or in `.user.ini` (if you are using PHP >= 5.3 with CGI or FastCGI). +If you experience problems uploading large photos, you might want to change the PHP parameters in `.htaccess` (if you are using the PHP Apache module) or in `.user.ini` (if you are using PHP >= 5.5 with CGI or FastCGI). If possible, change these settings directly in your `php.ini`. We recommend to increase the values of the following properties: