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

Lychee using .exec() even if it is not available. #1341

Closed
Wato1818 opened this issue May 23, 2022 · 1 comment · Fixed by #1397
Closed

Lychee using .exec() even if it is not available. #1341

Wato1818 opened this issue May 23, 2022 · 1 comment · Fixed by #1397
Labels
bug Something isn't working

Comments

@Wato1818
Copy link

Description of the problem

Lychee says php.exec() is optional, but it is used in one step of the installation and later used by exif when uploading a photo.

Situation 1:

Install lychee from the 4.0.0 release with php.exec() function disabled (In my case it is disabled by the system administrator and it cannot be activated) and get an error with 500 status code on the final step of the installation (after configuring the .env variables from the GUI).

I modified the following files to bypass the version check using exec(). These were the files that caused problems in proceding with the installation process mentioned above.

1.-Lychee/database/migrations/2019_12_25_0600_config_exiftool_ternary.php
- failed on line 23

2.- Lychee/database/migrations/2020_01_04_1200_config_has_ffmpeg.php
- failed on line 24

I knew this because the error page showing the status code 500 mentioned one of these files. I tried to bypass one, then the error page reapeared but this time pointing the error to a different file. It stoped after modifying the second file.

Then i could install lychee with no problems.

Situation 2:

1.- Try to upload a photo in any directory using the super admin account.

When trying to upload a photo, exif uses exec() to get the path of the tool it is going to use.
https://github.com/LycheeOrg/php-exif/blob/568b56c6b33cca87dcb56103d1d1eb0609091def/lib/PHPExif/Adapter/Exiftool.php
on line 99

Output of the diagnostics [REQUIRED]

Diagnostics
-----------
Warning: Dropbox import not working. dropbox_key is empty.
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Warning: You may experience problems when uploading a photo of large size or handling many/large albums. Take a look in the FAQ for details.
Warning: exec function has been disabled. You may experience some error 500, please report them to us.
Error: PHP zip extension not activated

System Information
------------------
Lychee Version (release):        4.4.0
DB Version:                      4.4.0

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       true

System:                          Linux
PHP Version:                     8.1
PHP User agent:                  Lychee/4 (https://lycheeorg.github.io/)
Max uploaded file size:          2M
Max post size:                   8M
Max execution time:              30
MySQL Version:                   5.7.38

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1690
GD Version:                      bundled (2.1.0 compatible)

Config Information
------------------
version:                         040400
check_for_updates:               0
sorting_Photos_col:              taken_at
sorting_Photos_order:            ASC
sorting_Albums_col:              max_taken_at
sorting_Albums_order:            ASC
imagick:                         1
skip_duplicates:                 0
small_max_width:                 0
small_max_height:                360
medium_max_width:                1920
medium_max_height:               1080
lang:                            es
layout:                          1
image_overlay_type:              desc
default_license:                 none
compression_quality:             90
full_photo:                      1
delete_imported:                 0
Mod_Frame:                       1
Mod_Frame_refresh:               30
thumb_2x:                        1
small_2x:                        1
medium_2x:                       1
landing_page_enable:             0
landing_owner:                   John Smith
landing_title:                   John Smith
landing_subtitle:                Cats, Dogs & Humans Photography
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
site_title:                      Lychee v4
site_copyright_enable:           1
site_copyright_begin:            2019
site_copyright_end:              2019
additional_footer_text:          
display_social_in_gallery:       0
public_search:                   0
SL_enable:                       0
SL_for_admin:                    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
import_via_symlink:              0
has_ffmpeg:                      1
location_decoding:               0
location_decoding_timeout:       30
location_show:                   1
location_show_public:            0
rss_enable:                      0
rss_recent_days:                 7
rss_max_items:                   100
prefer_available_xmp_metadata:   0
editor_enabled:                  1
lossless_optimization:           0
swipe_tolerance_x:               150
swipe_tolerance_y:               250
local_takestamp_video_formats:   .avi|.mov
log_max_num_line:                1000
unlock_password_photos_with_url_param: 0
nsfw_visible:                    1
nsfw_blur:                       0
nsfw_warning:                    0
nsfw_warning_admin:              0
map_display_direction:           1
album_subtitle_type:             oldstyle
upload_processing_limit:         4
public_photos_hidden:            1
new_photos_notification:         0

Browser and system

Lychee hosted on Centos 7

@nagmat84
Copy link
Collaborator

nagmat84 commented Jul 4, 2022

We got a duplicate bug report for this one within one month.

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

Successfully merging a pull request may close this issue.

3 participants