Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload photo - Internal server error #419

Closed
avalx opened this issue Dec 28, 2019 · 31 comments · Fixed by #435
Closed

Upload photo - Internal server error #419

avalx opened this issue Dec 28, 2019 · 31 comments · Fixed by #435

Comments

@avalx
Copy link

avalx commented Dec 28, 2019

Detailed description of the problem

After latest upgrade of Lychee (git pull) I can not upload any photo, I only get error: "Server returned an unknown response." In the Diagnostics log everything looks fine, also no errors in the Logs are shown.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Go to any album
  2. Click on + and choose Upload Photo
  3. Select a photo in the file browser
  4. Upload Failed

Screenshots

image

Output of the diagnostics

Diagnostics
-----------
Info: Latest version of PHP is 7.4
Warning: Dropbox import not working. dropbox_key is empty.

System Information
------------------
Lychee-front Version:      3.2.16
Lychee Version (git):      f10b4f1 (master) - Data not in Cache
DB Version:                040000
System:                    Linux
PHP Version:               7.3
MySQL Version:             10.3.20-MariaDB

Lychee total space:        507.60 MB
Upload folder space:       451.74 MB
System total space:        105.20 GB
System free space:         85.81 GB (81%)

Imagick:                   1
Imagick Active:            1
Imagick Version:           1690
GD Version:                2.2.5

Config Information
------------------
version:                   040000
check_for_updates:         1
sorting_Photos_col:        takestamp
sorting_Photos_order:      ASC
sorting_Albums_col:        description
sorting_Albums_order:      DESC
imagick:                   1
skip_duplicates:           0
small_max_width:           0
small_max_height:          360
medium_max_width:          1920
medium_max_height:         1080
lang:                      en
layout:                    1
image_overlay:             1
image_overlay_type:        exif
default_license:           none
compression_quality:       90
full_photo:                1
delete_imported:           1
Mod_Frame:                 0
Mod_Frame_refresh:         30
landing_page_enable:       0
landing_owner:             Andrej Valencic
landing_title:             A V
landing_subtitle:          These are my photos!
landing_facebook:          https://www.facebook.com/JohnSmith
landing_flickr:            https://www.flickr.com/JohnSmith
landing_twitter:           https://www.twitter.com/JohnSmith
landing_instagram:         https://instagram.com/JohnSmith
landing_youtube:           https://www.youtube.com/JohnSmith
landing_background:        dist/cat.jpg
thumb_2x:                  1
small_2x:                  0
medium_2x:                 0
site_title:                Lychee v4
site_copyright_enable:     1
site_copyright_begin:      2019
site_copyright_end:        2019
public_search:             0
additional_footer_text:    
display_social_in_gallery: 0
public_recent:             0
recent_age:                1
public_starred:            0
downloadable:              0
photos_wraparound:         1
map_display:               0
zip64:                     1
map_display_public:        0
map_provider:              Wikimedia
force_32bit_ids:           0
map_include_subalbums:     0
update_check_every_days:   3
has_exiftool:              1
share_button_visible:      0

Browser and system

Server Fedora 31
Client Windows 10, Vivaldi or Firefox latest browser

Console output:

main.js?1577525663:7846 POST http://www.sever.lan/Lychee/public/api/Photo::add 500 (Internal Server Error)
process @ main.js?1577525663:7846
(anonymous) @ main.js?1577525663:7867
n @ main.js?1577525663:20
upload.show @ main.js?1577525663:7662
local @ main.js?1577525663:7864
(anonymous) @ main.js?1577525663:3056
dispatch @ main.js?1577525663:2
v.handle @ main.js?1577525663:2
main.js?1577525663:3977 {description: "Upload failed. Server returned an unkown error!", params: XMLHttpRequest, response: ""}
lychee.error @ main.js?1577525663:3977
xhr.onload @ main.js?1577525663:7795
load (async)
process @ main.js?1577525663:7741
(anonymous) @ main.js?1577525663:7867
n @ main.js?1577525663:20
upload.show @ main.js?1577525663:7662
local @ main.js?1577525663:7864
(anonymous) @ main.js?1577525663:3056
dispatch @ main.js?1577525663:2
v.handle @ main.js?1577525663:2

@tmp-hallenser
Copy link
Contributor

Could the file size of the image be an issue? (PHP parameters upload_max_filesize and post_max_size)

@avalx
Copy link
Author

avalx commented Dec 28, 2019

Could the file size of the image be an issue? (PHP parameters upload_max_filesize and post_max_size)

I guess not because they are both set to 512M.

@tmp-hallenser
Copy link
Contributor

Does it happen with all photo? (e.g. those https://github.com/LycheeOrg/php-exif/tree/master/tests/files)
Did you try to use docker containers? (might cause less trouble)

@avalx
Copy link
Author

avalx commented Jan 1, 2020

Yes, it happens also with the test photos you mentioned.

I'm not familiar with docker container so I don't know how to setup that for Lychee - sorry.

@ildyria
Copy link
Member

ildyria commented Jan 6, 2020

As you have an error 500, can you please apply:
https://github.com/LycheeOrg/Lychee-Laravel/wiki/I-have-an-Error-500-what-can-I-do#i-add-error-reporting-to-lychee

This will not solve your issue but this will give you more details of why it failed.

@avalx
Copy link
Author

avalx commented Jan 6, 2020

I've checked things in your link: the APP_DEBUG was already set to true and in the console there is only the info that was there already. I've also checked the phpinfo page but I don't know what to look for in that information.

PHP 7.3.13 - phpinfo().html.zip

Lychee v4 - Welcome 2020-01-06 15 42 38 www sever lan 55efdac585bb

@SerenaButler
Copy link
Contributor

I have the same problem now :-(

@tmp-hallenser
Copy link
Contributor

Could this be related für #413 ? The fix has been merged today (clear composer cache, remove folder 'vendor' and run composer install)

@ildyria
Copy link
Member

ildyria commented Jan 16, 2020

@tmp-hallenser this is also why I rebuild a release archive. 👍

@SerenaButler
Copy link
Contributor

Still not working :-( Didi composer clear-cache, deleted vendors ...

I have to do "composer install --no-dev" btw else I get

"Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested PHP extension ext-imagick * is missing from your system. Install or enable PHP's imagick extension."

It worked all a while before ...

@avalx
Copy link
Author

avalx commented Jan 16, 2020

Could this be related für #413 ? The fix has been merged today (clear composer cache, remove folder 'vendor' and run composer install)

Tried this with no luck - still not able to upload photos! I might try a clean install some time later.

@SerenaButler
Copy link
Contributor

Try setting has_exiftool to 0. Worked for me.

@tmp-hallenser
Copy link
Contributor

@SerenaButler That's a first step into solving the issue. It seems to be related to the exiftool.

Could you help with further debugging? I'd like to have the following:

  1. Details where the error occurred (unfold the console output from above a bit more, we need the information like here on the left EXIF tool addition breaks importing PNG and GIFs #413 (comment))
  2. Share a sample file
  3. Provide the output of exiftool -G failing_file.jpg

@avalx
Copy link
Author

avalx commented Jan 17, 2020

  1. Details where the error occurred (unfold the console output from above a bit more, we need the information like here on the left #413 (comment))

I'm sorry but I don't know how to produce something like that.

  1. Share a sample file

In the attachment
P1050265

  1. Provide the output of exiftool -G failing_file.jpg

[ExifTool] ExifTool Version Number : 11.70 [File] File Name : P1050265.JPG [File] Directory : /storage/Temp [File] File Size : 1263 kB [File] File Modification Date/Time : 2011:03:07 17:47:17+01:00 [File] File Access Date/Time : 2020:01:17 09:52:17+01:00 [File] File Inode Change Date/Time : 2020:01:17 09:47:53+01:00 [File] File Permissions : rw-r--r-- [File] File Type : JPEG [File] File Type Extension : jpg [File] MIME Type : image/jpeg [File] Exif Byte Order : Little-endian (Intel, II) [File] Current IPTC Digest : 7d425de16d3f17081a271b05551c9092 [File] Image Width : 2362 [File] Image Height : 1885 [File] Encoding Process : Baseline DCT, Huffman coding [File] Bits Per Sample : 8 [File] Color Components : 3 [File] Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1) [JFIF] JFIF Version : 1.01 [EXIF] Make : Panasonic [EXIF] Camera Model Name : DMC-TZ3 [EXIF] X Resolution : 72 [EXIF] Y Resolution : 72 [EXIF] Resolution Unit : inches [EXIF] Software : Ver.1.0 [EXIF] Modify Date : 2011:03:05 12:31:22 [EXIF] Y Cb Cr Positioning : Co-sited [EXIF] Exposure Time : 1/1300 [EXIF] F Number : 4.3 [EXIF] Exposure Program : Program AE [EXIF] ISO : 100 [EXIF] Exif Version : 0221 [EXIF] Date/Time Original : 2011:03:05 12:31:22 [EXIF] Create Date : 2011:03:05 12:31:22 [EXIF] Components Configuration : Y, Cb, Cr, - [EXIF] Compressed Bits Per Pixel : 4 [EXIF] Exposure Compensation : 0 [EXIF] Max Aperture Value : 3.3 [EXIF] Metering Mode : Center-weighted average [EXIF] Light Source : Unknown [EXIF] Flash : Off, Did not fire [EXIF] Focal Length : 9.1 mm [EXIF] Flashpix Version : 0100 [EXIF] Color Space : sRGB [EXIF] Exif Image Width : 2362 [EXIF] Exif Image Height : 1885 [EXIF] Interoperability Index : R98 - DCF basic file (sRGB) [EXIF] Interoperability Version : 0100 [EXIF] Related Image Width : 2560 [EXIF] Related Image Height : 1920 [EXIF] Sensing Method : One-chip color area [EXIF] File Source : Digital Camera [EXIF] Scene Type : Directly photographed [EXIF] Custom Rendered : Normal [EXIF] Exposure Mode : Auto [EXIF] Digital Zoom Ratio : 0 [EXIF] Focal Length In 35mm Format : 66 mm [EXIF] Scene Capture Type : Standard [EXIF] Gain Control : None [EXIF] Contrast : Normal [EXIF] Saturation : Normal [EXIF] Sharpness : Normal [EXIF] Image Unique ID : 2627267259ae8935c7bec2b26be113c8 [EXIF] Compression : JPEG (old-style) [EXIF] Thumbnail Offset : 7918 [EXIF] Thumbnail Length : 4088 [EXIF] Thumbnail Image : (Binary data 4088 bytes, use -b option to extract) [MakerNotes] Image Quality : High [MakerNotes] Firmware Version : 0.1.0.9 [MakerNotes] White Balance : Auto [MakerNotes] Focus Mode : Auto, Continuous [MakerNotes] AF Area Mode : 9-area [MakerNotes] Image Stabilization : On, Mode 2 [MakerNotes] Macro Mode : Off [MakerNotes] Shooting Mode : Normal [MakerNotes] Audio : No [MakerNotes] Data Dump : (Binary data 6152 bytes, use -b option to extract) [MakerNotes] White Balance Bias : 0 [MakerNotes] Flash Bias : 0 [MakerNotes] Internal Serial Number : (F55) 2007:05:17 no. 0186 [MakerNotes] Panasonic Exif Version : 0220 [MakerNotes] Color Effect : Off [MakerNotes] Time Since Power On : 00:00:16.12 [MakerNotes] Burst Mode : Off [MakerNotes] Sequence Number : 0 [MakerNotes] Contrast Mode : Normal [MakerNotes] Noise Reduction : Standard [MakerNotes] Self Timer : Off [MakerNotes] Rotation : Horizontal (normal) [MakerNotes] AF Assist Lamp : Enabled but Not Used [MakerNotes] Color Mode : Normal [MakerNotes] Optical Zoom Mode : Extended [MakerNotes] Conversion Lens : Off [MakerNotes] Travel Day : n/a [MakerNotes] World Time Location : Home [MakerNotes] Program ISO : n/a [MakerNotes] Maker Note Version : 0101 [MakerNotes] Scene Mode : Off [MakerNotes] Highlight Warning : No [MakerNotes] Dark Focus Environment : No [MakerNotes] WB Red Level : 2056 [MakerNotes] WB Green Level : 1054 [MakerNotes] WB Blue Level : 1733 [MakerNotes] Text Stamp : Off [MakerNotes] Baby Age : (not set) [PrintIM] PrintIM Version : 0250 [XMP] XMP Toolkit : XMP Core 5.1.2 [IPTC] Caption-Abstract : Planinc 5-3-2011 [Composite] Aperture : 4.3 [Composite] Blue Balance : 1.644213 [Composite] Image Size : 2362x1885 [Composite] Megapixels : 4.5 [Composite] Red Balance : 1.950664 [Composite] Scale Factor To 35 mm Equivalent: 7.3 [Composite] Shutter Speed : 1/1300 [Composite] Circle Of Confusion : 0.004 mm [Composite] Field Of View : 30.5 deg [Composite] Focal Length : 9.1 mm (35 mm equivalent: 66.0 mm) [Composite] Hyperfocal Distance : 4.65 m [Composite] Light Value : 14.6

@SerenaButler
Copy link
Contributor

exif_prob_01

=============================================

Ibanez_Studio_ST824_Refurbish_067

=============================================

exiftool -G exif.jpg
[ExifTool] ExifTool Version Number : 10.10
[File] File Name : exif.jpg
[File] Directory : .
[File] File Size : 1026 kB
[File] File Modification Date/Time : 2020:01:16 16:10:33+01:00
[File] File Access Date/Time : 2020:01:16 21:21:42+01:00
[File] File Inode Change Date/Time : 2020:01:16 21:21:14+01:00
[File] File Permissions : rw-r--r--
[File] File Type : JPEG
[File] File Type Extension : jpg
[File] MIME Type : image/jpeg
[File] Exif Byte Order : Little-endian (Intel, II)
[File] Image Width : 2048
[File] Image Height : 1536
[File] Encoding Process : Baseline DCT, Huffman coding
[File] Bits Per Sample : 8
[File] Color Components : 3
[File] Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
[JFIF] JFIF Version : 1.02
[EXIF] Make : Apple
[EXIF] Camera Model Name : iPhone X
[EXIF] Orientation : Horizontal (normal)
[EXIF] X Resolution : 72
[EXIF] Y Resolution : 72
[EXIF] Resolution Unit : inches
[EXIF] Software : ACDSee Ultimate 2018
[EXIF] Modify Date : 2020:01:16 16:10:33
[EXIF] Y Cb Cr Positioning : Centered
[EXIF] Exposure Time : 1/33
[EXIF] F Number : 1.8
[EXIF] Exposure Program : Program AE
[EXIF] ISO : 25
[EXIF] Exif Version : 0231
[EXIF] Date/Time Original : 2020:01:14 23:01:08
[EXIF] Create Date : 2020:01:14 23:01:08
[EXIF] Components Configuration : Y, Cb, Cr, -
[EXIF] Shutter Speed Value : 1/33
[EXIF] Aperture Value : 1.8
[EXIF] Brightness Value : 4.140979696
[EXIF] Exposure Compensation : 0
[EXIF] Metering Mode : Multi-segment
[EXIF] Flash : Off, Did not fire
[EXIF] Focal Length : 4.0 mm
[EXIF] Subject Area : 2015 1511 2217 1330
[EXIF] Sub Sec Time : 488
[EXIF] Sub Sec Time Original : 970
[EXIF] Sub Sec Time Digitized : 970
[EXIF] Flashpix Version : 0100
[EXIF] Color Space : Uncalibrated
[EXIF] Exif Image Width : 2048
[EXIF] Exif Image Height : 1536
[EXIF] Sensing Method : One-chip color area
[EXIF] Scene Type : Directly photographed
[EXIF] Exposure Mode : Auto
[EXIF] White Balance : Auto
[EXIF] Focal Length In 35mm Format : 28 mm
[EXIF] Scene Capture Type : Standard
[EXIF] Lens Info : 4-6mm f/1.8-2.4
[EXIF] Lens Make : Apple
[EXIF] Lens Model : iPhone X back dual camera 4mm f/1.8
[MakerNotes] Run Time Flags : Valid
[MakerNotes] Run Time Value : 818708252983750
[MakerNotes] Run Time Scale : 1000000000
[MakerNotes] Run Time Epoch : 0
[ICC_Profile] Profile CMM Type : appl
[ICC_Profile] Profile Version : 4.0.0
[ICC_Profile] Profile Class : Display Device Profile
[ICC_Profile] Color Space Data : RGB
[ICC_Profile] Profile Connection Space : XYZ
[ICC_Profile] Profile Date Time : 2017:07:07 13:22:32
[ICC_Profile] Profile File Signature : acsp
[ICC_Profile] Primary Platform : Apple Computer Inc.
[ICC_Profile] CMM Flags : Not Embedded, Independent
[ICC_Profile] Device Manufacturer : APPL
[ICC_Profile] Device Model :
[ICC_Profile] Device Attributes : Reflective, Glossy, Positive, Color
[ICC_Profile] Rendering Intent : Perceptual
[ICC_Profile] Connection Space Illuminant : 0.9642 1 0.82491
[ICC_Profile] Profile Creator : appl
[ICC_Profile] Profile ID : ca1a9582257f104d389913d5d1ea1582
[ICC_Profile] Profile Description : Display P3
[ICC_Profile] Profile Copyright : Copyright Apple Inc., 2017
[ICC_Profile] Media White Point : 0.95045 1 1.08905
[ICC_Profile] Red Matrix Column : 0.51512 0.2412 -0.00105
[ICC_Profile] Green Matrix Column : 0.29198 0.69225 0.04189
[ICC_Profile] Blue Matrix Column : 0.1571 0.06657 0.78407
[ICC_Profile] Red Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
[ICC_Profile] Chromatic Adaptation : 1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168
[ICC_Profile] Blue Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
[ICC_Profile] Green Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
[Composite] Aperture : 1.8
[Composite] Image Size : 2048x1536
[Composite] Megapixels : 3.1
[Composite] Run Time Since Power Up : 9 days 11:25:08
[Composite] Scale Factor To 35 mm Equivalent: 7.0
[Composite] Shutter Speed : 1/33
[Composite] Create Date : 2020:01:14 23:01:08.970
[Composite] Date/Time Original : 2020:01:14 23:01:08.970
[Composite] Modify Date : 2020:01:16 16:10:33.488
[Composite] Circle Of Confusion : 0.004 mm
[Composite] Field Of View : 65.5 deg
[Composite] Focal Length : 4.0 mm (35 mm equivalent: 28.0 mm)
[Composite] Hyperfocal Distance : 2.07 m
[Composite] Light Value : 8.7

@tmp-hallenser
Copy link
Contributor

@SerenaButler Could you provide the content of "ResponseText" (under params)? (If needed: Firefox Dev let's you export the content). This will show us where the error occurred.

@SerenaButler
Copy link
Contributor

Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. gallery
{…}

description: "Upload failed. Server returned an unkown error!"

params: XMLHttpRequest
​​
mozAnon: false
​​
mozSystem: false
​​
onabort: null
​​
onerror: null
​​
onload: function onload()
​​
onloadend: null
​​
onloadstart: null
​​
onprogress: null
​​
onreadystatechange: null
​​
ontimeout: null
​​
readyState: 4
​​
response: "\n<html lang="en">\n \n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n\n <title>Server Error</title>\n\n \n <link rel="dns-prefetch" href="//fonts.gstatic.com">\n <link href="https://fonts.googleapis.com/css?family=Nunito\" rel="stylesheet">\n\n \n <style>\n html, body {\n background-color: #fff;\n color: #636b6f;\n font-family: 'Nunito', sans-serif;\n font-weight: 100;\n height: 100vh;\n margin: 0;\n }\n\n .full-height {\n height: 100vh;\n }\n\n .flex-center {\n align-items: center;\n display: flex;\n justify-content: center;\n }\n\n .position-ref {\n position: relative;\n }\n\n .code {\n border-right: 2px solid;\n font-size: 26px;\n padding: 0 15px 0 15px;\n text-align: center;\n }\n\n .message {\n font-size: 18px;\n text-align: center;\n }\n </style>\n \n \n <div class="flex-center position-ref full-height">\n <div class="code">\n 500 \n\n <div class="message" style="padding: 10px;">\n Server Error \n \n \n\n"
​​
responseText: "\n<html lang="en">\n \n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n\n <title>Server Error</title>\n\n \n <link rel="dns-prefetch" href="//fonts.gstatic.com">\n <link href="https://fonts.googleapis.com/css?family=Nunito\" rel="stylesheet">\n\n \n <style>\n html, body {\n background-color: #fff;\n color: #636b6f;\n font-family: 'Nunito', sans-serif;\n font-weight: 100;\n height: 100vh;\n margin: 0;\n }\n\n .full-height {\n height: 100vh;\n }\n\n .flex-center {\n align-items: center;\n display: flex;\n justify-content: center;\n }\n\n .position-ref {\n position: relative;\n }\n\n .code {\n border-right: 2px solid;\n font-size: 26px;\n padding: 0 15px 0 15px;\n text-align: center;\n }\n\n .message {\n font-size: 18px;\n text-align: center;\n }\n </style>\n \n \n <div class="flex-center position-ref full-height">\n <div class="code">\n 500 \n\n <div class="message" style="padding: 10px;">\n Server Error \n \n \n\n"
​​
responseType: ""
​​
responseURL: "https://lychee-test.indee.de/api/Photo::add"
​​
responseXML: null
​​
status: 500
​​
statusText: "Internal Server Error"
​​
timeout: 0
​​
upload: XMLHttpRequestUpload { onloadstart: null, onprogress: onprogress(), onabort: null, … }
​​
withCredentials: false
​​
: XMLHttpRequestPrototype { open: open(), setRequestHeader: setRequestHeader(), send: send(), … }

response: ""

: Object { … }
main.js:3977:11
Source-Map-Fehler: Error: request failed with status 404
Ressourcen-Adresse: https://lychee-test.indee.de/dist/main.js?1579193912
Source-Map-Adresse: resources/livephotoskit.js.map

@tmp-hallenser
Copy link
Contributor

hm, this does not help. If have the suspicion that the error is somewhere in the exiftool part. Could you create a php file in the Lychee base folder with the following content:

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require __DIR__ . '/vendor/autoload.php';

$reader = null;
$filename = 'your_jpg.JPG';

  // reader with Exiftool adapter
  $reader = \PHPExif\Reader\Reader::factory(\PHPExif\Reader\Reader::TYPE_EXIFTOOL);
  // reader with native adapter
  //$reader = \PHPExif\Reader\Reader::factory(\PHPExif\Reader\Reader::TYPE_NATIVE);


$exif = $reader->read($filename);
echo $exif->getCreationDate()->format('y-m-d h:i:s') . PHP_EOL;
echo $exif->getWidth() . PHP_EOL;
echo $exif->getHeight() . PHP_EOL;
var_dump($exif->getRawData());

and run it from the console via php my_new_php_file.php. Let's hope to get some more insights ...

@SerenaButler
Copy link
Contributor

Fatal error: Uncaught RuntimeException: Could not decode exiftool output in /www/htdocs/XXXXXX/Lychee-Laravel-Work/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/Exiftool.php:151
Stack trace:
#0 /www/htdocs/XXXXXX/Lychee-Laravel-Work/vendor/lychee-org/php-exif/lib/PHPExif/Reader/Reader.php(103): PHPExif\Adapter\Exiftool->getExifFromFile('your_jpg.JPG')
#1 /www/htdocs/XXXXXX/Lychee-Laravel-Work/test.php(16): PHPExif\Reader\Reader->read('your_jpg.JPG')
#2 {main}
thrown in /www/htdocs/XXXXXX/Lychee-Laravel-Work/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/Exiftool.php on line 151

@tmp-hallenser
Copy link
Contributor

Did you replace the 'your_jpp.JPG' in line 8 with a valid path to a photo?

@SerenaButler
Copy link
Contributor

Sorry I just did copy and paste my head is elsewhere :-P

20-01-14 11:01:08
2048
1536
array(108) {
["SourceFile"]=>
string(8) "exif.jpg"
["ExifTool:ExifToolVersion"]=>
float(10.1)
["System:FileName"]=>
string(8) "exif.jpg"
["System:Directory"]=>
string(1) "."
["System:FileSize"]=>
int(1051126)
["System:FileModifyDate"]=>
string(25) "2020:01:16 16:10:33+01:00"
["System:FileAccessDate"]=>
string(25) "2020:01:17 13:06:02+01:00"
["System:FileInodeChangeDate"]=>
string(25) "2020:01:17 13:05:36+01:00"
["System:FilePermissions"]=>
int(644)
["File:FileType"]=>
string(4) "JPEG"
["File:FileTypeExtension"]=>
string(3) "JPG"
["File:MIMEType"]=>
string(10) "image/jpeg"
["File:ExifByteOrder"]=>
string(2) "II"
["File:ImageWidth"]=>
int(2048)
["File:ImageHeight"]=>
int(1536)
["File:EncodingProcess"]=>
int(0)
["File:BitsPerSample"]=>
int(8)
["File:ColorComponents"]=>
int(3)
["File:YCbCrSubSampling"]=>
string(3) "2 1"
["JFIF:JFIFVersion"]=>
string(3) "1 2"
["JFIF:ResolutionUnit"]=>
int(0)
["JFIF:XResolution"]=>
int(1)
["JFIF:YResolution"]=>
int(1)
["IFD0:Make"]=>
string(5) "Apple"
["IFD0:Model"]=>
string(8) "iPhone X"
["IFD0:Orientation"]=>
int(1)
["IFD0:XResolution"]=>
int(72)
["IFD0:YResolution"]=>
int(72)
["IFD0:ResolutionUnit"]=>
int(2)
["IFD0:Software"]=>
string(20) "ACDSee Ultimate 2018"
["IFD0:ModifyDate"]=>
string(19) "2020:01:16 16:10:33"
["IFD0:YCbCrPositioning"]=>
int(1)
["ExifIFD:ExposureTime"]=>
float(0.0303030303)
["ExifIFD:FNumber"]=>
float(1.8)
["ExifIFD:ExposureProgram"]=>
int(2)
["ExifIFD:ISO"]=>
int(25)
["ExifIFD:ExifVersion"]=>
string(4) "0231"
["ExifIFD:DateTimeOriginal"]=>
string(19) "2020:01:14 23:01:08"
["ExifIFD:CreateDate"]=>
string(19) "2020:01:14 23:01:08"
["ExifIFD:ComponentsConfiguration"]=>
string(7) "1 2 3 0"
["ExifIFD:ShutterSpeedValue"]=>
float(0.029980000093283)
["ExifIFD:ApertureValue"]=>
float(1.7999999999314)
["ExifIFD:BrightnessValue"]=>
float(4.140979696)
["ExifIFD:ExposureCompensation"]=>
int(0)
["ExifIFD:MeteringMode"]=>
int(5)
["ExifIFD:Flash"]=>
int(16)
["ExifIFD:FocalLength"]=>
int(4)
["ExifIFD:SubjectArea"]=>
string(19) "2015 1511 2217 1330"
["ExifIFD:SubSecTime"]=>
int(488)
["ExifIFD:SubSecTimeOriginal"]=>
int(970)
["ExifIFD:SubSecTimeDigitized"]=>
int(970)
["ExifIFD:FlashpixVersion"]=>
string(4) "0100"
["ExifIFD:ColorSpace"]=>
int(65535)
["ExifIFD:ExifImageWidth"]=>
int(2048)
["ExifIFD:ExifImageHeight"]=>
int(1536)
["ExifIFD:SensingMethod"]=>
int(2)
["ExifIFD:SceneType"]=>
int(1)
["ExifIFD:ExposureMode"]=>
int(0)
["ExifIFD:WhiteBalance"]=>
int(0)
["ExifIFD:FocalLengthIn35mmFormat"]=>
int(28)
["ExifIFD:SceneCaptureType"]=>
int(0)
["ExifIFD:LensInfo"]=>
string(11) "4 6 1.8 2.4"
["ExifIFD:LensMake"]=>
string(5) "Apple"
["ExifIFD:LensModel"]=>
string(35) "iPhone X back dual camera 4mm f/1.8"
["Apple:RunTimeFlags"]=>
int(1)
["Apple:RunTimeValue"]=>
int(818708252983750)
["Apple:RunTimeScale"]=>
int(1000000000)
["Apple:RunTimeEpoch"]=>
int(0)
["ICC-header:ProfileCMMType"]=>
string(4) "appl"
["ICC-header:ProfileVersion"]=>
int(1024)
["ICC-header:ProfileClass"]=>
string(4) "mntr"
["ICC-header:ColorSpaceData"]=>
string(4) "RGB "
["ICC-header:ProfileConnectionSpace"]=>
string(4) "XYZ "
["ICC-header:ProfileDateTime"]=>
string(19) "2017:07:07 13:22:32"
["ICC-header:ProfileFileSignature"]=>
string(4) "acsp"
["ICC-header:PrimaryPlatform"]=>
string(4) "APPL"
["ICC-header:CMMFlags"]=>
int(0)
["ICC-header:DeviceManufacturer"]=>
string(4) "APPL"
["ICC-header:DeviceModel"]=>
string(0) ""
["ICC-header:DeviceAttributes"]=>
string(3) "0 0"
["ICC-header:RenderingIntent"]=>
int(0)
["ICC-header:ConnectionSpaceIlluminant"]=>
string(16) "0.9642 1 0.82491"
["ICC-header:ProfileCreator"]=>
string(4) "appl"
["ICC-header:ProfileID"]=>
string(56) "202 26 149 130 37 127 16 77 56 153 19 213 209 234 21 130"
["ICC_Profile:ProfileDescription"]=>
string(10) "Display P3"
["ICC_Profile:ProfileCopyright"]=>
string(26) "Copyright Apple Inc., 2017"
["ICC_Profile:MediaWhitePoint"]=>
string(17) "0.95045 1 1.08905"
["ICC_Profile:RedMatrixColumn"]=>
string(23) "0.51512 0.2412 -0.00105"
["ICC_Profile:GreenMatrixColumn"]=>
string(23) "0.29198 0.69225 0.04189"
["ICC_Profile:BlueMatrixColumn"]=>
string(22) "0.1571 0.06657 0.78407"
["ICC_Profile:RedTRC"]=>
string(48) "(Binary data 32 bytes, use -b option to extract)"
["ICC_Profile:ChromaticAdaptation"]=>
string(73) "1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168"
["ICC_Profile:BlueTRC"]=>
string(48) "(Binary data 32 bytes, use -b option to extract)"
["ICC_Profile:GreenTRC"]=>
string(48) "(Binary data 32 bytes, use -b option to extract)"
["Composite:Aperture"]=>
float(1.8)
["Composite:ImageSize"]=>
string(9) "2048x1536"
["Composite:Megapixels"]=>
float(3.145728)
["Composite:RunTimeSincePowerUp"]=>
float(818708.25298375)
["Composite:ScaleFactor35efl"]=>
int(7)
["Composite:ShutterSpeed"]=>
float(0.0303030303)
["Composite:SubSecCreateDate"]=>
string(23) "2020:01:14 23:01:08.970"
["Composite:SubSecDateTimeOriginal"]=>
string(23) "2020:01:14 23:01:08.970"
["Composite:SubSecModifyDate"]=>
string(23) "2020:01:16 16:10:33.488"
["Composite:CircleOfConfusion"]=>
string(19) "0.00429232294698094"
["Composite:FOV"]=>
float(65.470507844787)
["Composite:FocalLength35efl"]=>
int(28)
["Composite:HyperfocalDistance"]=>
float(2.0708807325742)
["Composite:LightValue"]=>
float(8.7403879326126)
}

@tmp-hallenser
Copy link
Contributor

Hm, that's strange. I was "hoping" php-exif is failing somewhere. Let me think how we can find out where the code is failing on your installation.

@tmp-hallenser
Copy link
Contributor

Could you try the following in order to get some more information on where the failure occurs.

  1. Create the following folder structure somewhere: root_folder/my_test_album/your_jpg.jpg
  2. Check-out the branch 'sync-from-cli'
  3. php artisan lychee:sync /path/to/your/folder/root_folder

This should create an album call 'my_test_album' and import the file 'your_jpg.jpg' using the CLI. This should then print the error message directly in the shell.

Please replace 'your_jpg.jpg' with your file and locate the folder where it suits you.

Let's keep fingers crossed to get a proper error message.

@SerenaButler
Copy link
Contributor

I'm not that used to Git (I hate it btw .. haha) so I unfortunately don't know what you wann me to do exactly.

@tmp-hallenser
Copy link
Contributor

ok, no worries. Then let's try the manual way for pedestrians :)

  1. Create the following folder structure somewhere: root_folder/my_test_album/your_jpg.jpg

2a. Download this file and copy it to Lychee-Laravel/app/Console/Commands/sync.php
2b. Create backup of app/Http/Controllers/ImportController.phpand app/ModelFunctions/PhotoFunctions.php
2c. Replace the two backed up files with file 1 and file 2

  1. php artisan lychee:sync /path/to/your/folder/root_folder

@SerenaButler
Copy link
Contributor

php artisan lychee:sync /www/htdocs/XXXXXXX/Lychee-Laravel-Test/root_folder
Start syncing.
Status: /www/htdocs/XXXXXXX/Lychee-Laravel-Test/root_folder: 0%
Status: /www/htdocs/XXXXXXX/Lychee-Laravel-Test/root_folder: 100%
Status: /www/htdocs/XXXXXXX/Lychee-Laravel-Test/root_folder/test_album/: 0%
Status: /www/htdocs/XXXXXXX/Lychee-Laravel-Test/root_folder/test_album/: 100%
Done syncing.

@tmp-hallenser
Copy link
Contributor

Hm, that's very strange. Does the test_album now contain the imported jpg?
Can you try to import a second image to this folder (test_album) using the browser?

You basically just tested the importing function, but without the UI -> the importing code seems to work properly.

@SerenaButler
Copy link
Contributor

Nope, album created but no image. I accidentally used my real root folder before ... hahaha .. lot's of albums created AND some WITH images.

@SerenaButler
Copy link
Contributor

SerenaButler commented Jan 18, 2020

Mmm .... the following gif I can import via your code but NOT with the UI.

weihnachtshund-welpe-0053

@SerenaButler
Copy link
Contributor

The following png and jpg where imported vie CLI but not via UI.

22222

33333

@avalx
Copy link
Author

avalx commented Feb 12, 2020

Great, it works now! Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants