Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Upload // Error Message #205

Closed
SerenaButler opened this issue Feb 15, 2019 · 33 comments
Closed

Upload // Error Message #205

SerenaButler opened this issue Feb 15, 2019 · 33 comments
Labels
bug Something isn't working
Milestone

Comments

@SerenaButler
Copy link

Detailed description of the problem

Steps to reproduce the issue

When uploading images I got these errors. Images are uploaded fine though.

image

Console

image

Output of the diagnostics (Settings => Diagnostics)

Diagnostics

Warning: Dropbox import not working. No property for dropboxKey.
No critical problems found. Lychee should work without problems!

System Information

Lychee Version (json): 3.2.12
DB Version: update_030212
System: Linux
PHP Version: 7.1
MySQL Version: 50721
Imagick: 1
Imagick Active: 1
Imagick Version: 1673
GD Version: bundled (2.1.0 compatible)
Plugins:

Browser and system

Win 10 // Google Chrome Version 72.0.3626.109 (64-Bit)

@ildyria ildyria added bug Something isn't working High Priority High priority issues labels Feb 15, 2019
@ildyria
Copy link
Member

ildyria commented Feb 15, 2019

I cannot reproduce, do you have an image for me to try with ?

@SerenaButler
Copy link
Author

@d7415
Copy link
Contributor

d7415 commented Feb 15, 2019

Is there any output in Lychee's log?

@ildyria
Copy link
Member

ildyria commented Feb 15, 2019

Very weird, still could not reproduce. :(

@SerenaButler
Copy link
Author

Nothing unusual in Log, e.g.:
2019-02-15 16:26:35 - notice - Lychee\Modules\Photo::add (242) - Skipped adjustment of photo (disarmodel_review_atrevida_01)

My More Settings
lychee_upload_02

@d7415
Copy link
Contributor

d7415 commented Feb 15, 2019

If you run without useExiftool does it still raise errors?

@SerenaButler
Copy link
Author

Unfortunately yes ..:-(

@ildyria
Copy link
Member

ildyria commented Feb 15, 2019

can you do this:

git reset --hard HEAD^

try upload, this if this raise an error.
If it does, redo the command and try to upload etc...
Once it does not raise an error, do

git show HEAD

to see what is the last commit that was working for you.

It may sound scary but you should be fine, you can always do a git pull master to get back to your initial state.

@SerenaButler
Copy link
Author

Sorry can't do that. I always update manually. Not my server. Sorry :-(

@ildyria
Copy link
Member

ildyria commented Feb 15, 2019

:(

@SerenaButler
Copy link
Author

Anything else I can do or check?

@mir07
Copy link
Contributor

mir07 commented Feb 16, 2019

You say you update manually, so I presume this means simply copy the content of the lychee-some-version.zip to the folder on the server containing your lychee installation, right?
If you have done this I am certain that you miss this file: dist/user.css?
To fix the error simple create an empty file in the dist folder named user.css with owner changed to whatever owner found for files in uploads/big/

@SerenaButler
Copy link
Author

If you have done this I am certain that you miss this file: dist/user.css?

No ;-) But thanks.

@bennettscience
Copy link
Contributor

@SerenaButler Do you see any errors in the Network tab of the inspector? Check your XHR requests.

@SerenaButler
Copy link
Author

I get this:

1

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

Is your server running php in safe_mode?
See http://php.net/manual/en/ini.sect.safe-mode.php

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

Or are your server running on Windows?

@SerenaButler
Copy link
Author

No and No. I did not had this "false error" with 3.2.9.

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

But your error clearly states that the php interpreter is not allowed to run either /bin/sh or /usr/bin/which

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

What operating system do you specifically use, maker and version?
Your errors indicate that your php process is running in either a jail or protected mode where access to executing system commands is disallowed.

@d7415
Copy link
Contributor

d7415 commented Feb 18, 2019

I'm curious what the errors are without useExiftool, as that specific error shouldn't be triggered.

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

The error will be there whether using useExiftool or not since checking if useExiftool is true will execute the system call which detects whether exiftool are present or not. See 'public static function useExiftool()' in Settings.php

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

I have tried to see whether catching an exception is possible but without luck ;-(

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

I might have found a solution that does not cause error messages:

diff --git a/php/Modules/Settings.php b/php/Modules/Settings.php
index 928dee9..12440c5 100755
--- a/php/Modules/Settings.php
+++ b/php/Modules/Settings.php
@@ -352,8 +352,8 @@ final class Settings {
         /**
          * @return bool Returns the useExiftool setting.
          */
-        public static function useExiftool() {
-                system('which exiftool 2>&1 > /dev/null', $status);
+       public static function useExiftool() {
+                exec('which exiftool 2>&1 > /dev/null', $output, $status);
                 if ($status != 0) return false;
                 return (bool) (self::get()['useExiftool'] === '1');
         }

Could you try above patch?

@mir07
Copy link
Contributor

mir07 commented Feb 18, 2019

Forgot to mention. To provoke a similar error simply call a non existing command like 'which1'

@ildyria
Copy link
Member

ildyria commented Feb 18, 2019

Actually this version is better as you skip the test if you don't enable useExiftool:

public static function useExiftool() {
         if(self::get()['useExiftool'] === '1')
         {
             exec('which exiftool 2>&1 > /dev/null', $output, $status);
             if ($status != 0) return false;
             return true;
         }
         return false;
}

@SerenaButler
Copy link
Author

SerenaButler commented Feb 19, 2019

I can confirm that this (ildyrias code) is working and the error message is gone :-)

Thanks Michael! :-)

@SerenaButler
Copy link
Author

Do I understand it correct that the Exiftool is not working on my hosted webspace though?

@ildyria
Copy link
Member

ildyria commented Feb 19, 2019

@SerenaButler Either that or system/exec are disabled.

@ildyria ildyria removed the High Priority High priority issues label Feb 19, 2019
@ildyria ildyria added this to the v3.2.13 milestone Feb 19, 2019
@SerenaButler
Copy link
Author

I checked and I HAVE exiftool running in my hosted enviroment (all-inkl.de) so it would be nice to get it running with Lychee too ;-)

@ildyria
Copy link
Member

ildyria commented Feb 19, 2019

Surprising then :(
Care to open a new issue then? 😅
(I mean, this issue is about the error message 😛 )

@SerenaButler
Copy link
Author

Pffff .... hahaha ... ok :-P

@ildyria
Copy link
Member

ildyria commented Feb 19, 2019

Also feel free to drop by our gitter: https://gitter.im/LycheeOrg/Lobby :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants