LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.32k stars 296 forks source link

"Error: Not Found" with new install of Lychee 4 #1373

Closed aksansai closed 2 years ago

aksansai commented 2 years ago

Detailed description of the problem [REQUIRED]

After following the instructions for two different installs, I have the same error when visiting the URL where Lychee is located. The first install was using a MySQL backend - artisan migrate worked fine, but when visiting the URL, I get an ambiguous "Error: Not Found" error message at the top of the page. Thinking I might have goofed, I re-cloned the repo, followed the instructions but left SQLite as the database - this resulted in the same error message. Upon checking Apache's logs, I see as follows:

192.168.1.86 - - [14/Jun/2022:00:25:05 -0500] "GET /photos/index.php HTTP/1.1" 200 24180 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" 192.168.1.86 - - [14/Jun/2022:00:25:05 -0500] "GET /photos/dist/main.css?1655183382 HTTP/1.1" 200 14705 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" 192.168.1.86 - - [14/Jun/2022:00:25:05 -0500] "GET /photos/dist/user.css?1655183418 HTTP/1.1" 304 5013 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" 192.168.1.86 - - [14/Jun/2022:00:25:05 -0500] "GET /photos/dist/Larapass.js HTTP/1.1" 200 8133 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" 192.168.1.86 - - [14/Jun/2022:00:25:05 -0500] "GET /photos/dist/main.js?1655183382 HTTP/1.1" 200 250204 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" 192.168.1.86 - - [14/Jun/2022:00:25:06 -0500] "POST /photos/api/Session::init HTTP/1.1" 404 521 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"

There is nothing in the Apache error log.

A hint as to the cause maybe the fact that I cannot access the Diagnostics page via /Diagnostics. Instead, I must explicitly specify /index.php/Diagnostics. I have not altered the .htaccess file that has the rewrite rules from the repo.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Follow the installation instructions.
  2. Visit the URL. Get the "Error: Not Found" error.

Screenshots Screenshot is attached.

Output of the diagnostics [REQUIRED]

Diagnostics
-----------
Warning: Dropbox import not working. dropbox_key is empty.
Warning: zend.assertions is enabled although Lychee is not in debug mode. Outside of debugging, code generation for assertions is recommended to be disabled for efficiency reasons
Screen Shot 2022-06-14 at 12 25 07 AM
System Information
------------------
Lychee Version (git):            master (8511ea7) --  - Up to date (15 seconds ago).
DB Version:                      4.5.1

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

System:                          Linux
PHP Version:                     8.1
PHP User agent:                  Lychee/4 (https://lycheeorg.github.io/)
Timezone:                        America/Chicago
Max uploaded file size:          128M
Max post size:                   128M
Max execution time:              240
SQLite Version:                  3.37.2

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1691
GD Version:                      2.3.0

Config Information
------------------
version:                         040501
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:                            en
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
legacy_id_redirection:           1

Browser and system

Client system:

Server system:

aksansai commented 2 years ago

Github inserted the screenshot in the middle of the diagnostics log.

qwerty287 commented 2 years ago

This looks mostly like a bad configuration of the .htaccess. Did you have a look at https://lycheeorg.github.io/docs/#apache and https://lycheeorg.github.io/docs/faq.html#can-i-host-lychee-with-a-subpath-with-apache-like-httpsexampledevlychee (since you are serving from a subpath)? Did you use the .htaccess file provided in the repository?

aksansai commented 2 years ago

Thanks, @qwerty287 - I am using the default .htaccess file included with the repo. However, it was your clue on the apache specific configuration that I had overlooked prior. Perhaps a note in the markdown for the repo that web server specific configuration would help others.