Closed sunosv closed 2 years ago
Note: you did not follow the bug reporting template. However, see if the solution from #1304 works for you.
Note: you did not follow the bug reporting template. However, see if the solution from #1304 works for you.
sorry about that ,but there is no file .NO_SECURE_KEY ,and the APP_KEY=base64:5gu6ZvC+ObsmUZfvBYuhZKrwIMyXZwHwsNi1Lnb2gIU= was set
Help me, Please
Note: you did not follow the bug reporting template. However, see if the solution from #1304 works for you.
didn't work for me
Thank you for providing the missing information! Unfortunately, it's too late for me to look into it today, but just to make sure that I understand:
Are you downloading a zip file of the current git master and installing that?
Are you installing from scratch or updating? You had a Lychee installation in the past if I remember correctly?
And this is an installation on a Windows server? That's an environment that none of us developers uses so it may prove tricky to reproduce.
Have you tried not using the web installer? It's use isn't really mandatory...
@kamil4 Yes, It's the current git master.and I'm installing it from scratch. It is true that I have installed it before, and I have also submitted some problems, and you are very enthusiastic to help solve them.I remember the first part of the big refactoring. There is a master branch that was installable. I've been waiting for a full refactor and then trying to install the latest. But now I have this problem, even though I am using win server it was working fine before
Thank you for providing the missing information! Unfortunately, it's too late for me to look into it today, but just to make sure that I understand:
Are you downloading a zip file of the current git master and installing that?
Are you installing from scratch or updating? You had a Lychee installation in the past if I remember correctly?
And this is an installation on a Windows server? That's an environment that none of us developers uses so it may prove tricky to reproduce.
Have you tried not using the web installer? It's use isn't really mandatory...
I have tried not using the web, like: Run composer install --no-dev to install dependencies Copy .env.example as .env and edit it to match your parameters Generate your secret key with php artisan key:generate php artisan migrate
But As described above, can't open lychee
If you run the commands to install (composer install --no-dev
...), are there any errors? Especially if you run the composer
or the php artisan migrate
command? Is there any error, warning or something like this in the output of the command?
If you run the commands to install (
composer install --no-dev
...), are there any errors? Especially if you run thecomposer
or thephp artisan migrate
command? Is there any error, warning or something like this in the output of the command?
php artisan migrate
no warning or error, omposer install --no-dev
did has some error. But in the previous version, although there are errors, it doesn't matter much, and lychee can run normally, probably because win does not support sh scripts
Thanks! That should be pretty helpful! The issue is that https://github.com/LycheeOrg/Lychee/blob/master/composer.json#L88-L90 is not compatible with windows. My idea to solve this for you (not a real fix):
composer install --no-dev
touch public/dist/user.css
touch database/database.sqlite
My idea on solving this: can we replace the *.sh scripts by PHP scripts? For obvious reasons PHP scripts should be able to be interpreted by every host environment, even Windows. This might affect more than only this sh file, but all sh files which a normal ueer may bump into.
I haven't checked if there are even any other scripts, so it might as well as be that this is rhe only one. "Touching" two files is trivial in PHP, that's nothing which requires sh.
I don't care for scripts which are only used by developers , because I believe it is fair to assume that every developer is using Linux.
Thanks! That should be pretty helpful! The issue is that https://github.com/LycheeOrg/Lychee/blob/master/composer.json#L88-L90 is not compatible with windows. My idea to solve this for you (not a real fix):
- Remove the lines mentioned above from composer.json (also remove the comma in line 87) and remove line 86 and the comma in line 85
- Rerun
composer install --no-dev
- Run the steps of the problematic file manually:
touch public/dist/user.css touch database/database.sqlite
- Follow the other steps of the installation
still not working,Rerun composer install --no-dev
no waring and error
this is php artisan migrate
result
Still can't open the page of Lychee
I tried this branch , web installer is ok, So What went wrong with the current master
I don't have a Windows system (at least no usable not to speak of the missing web server). But if the bug has been introduced by the current master, it is highly likely that I am responsible for it. :cry: Let me see, if I can reproduce the problem on Linux, but first I must read our own user guidance to find out what I am supposed to do :grinning:
I don't have a Windows system (at least no usable not to speak of the missing web server). But if the bug has been introduced by the current master, it is highly likely that I am responsible for it. 😢 Let me see, if I can reproduce the problem on Linux, but first I must read our own user guidance to find out what I am supposed to do 😀
Thank you, That would be great.😁
Do I assume correctly that your took the most recent ZIP archive from https://github.com/LycheeOrg/Lychee/releases ? I am just asking, because some posts earlier you asked what went wrong with current master. The ZIP archive is not current master. This is fine for me, but I want to ensure that I am actually looking at the same version as you. I would like to avoid potentially spending hours on hunting a bug and then just realized that I haven looking at the wrong version.
Ah, and did you download the full sources or only the stripped down version, i.e.
? As you see, I am looking at our own download page for the first time of my life :grinning:
Ah, and did you download the full sources or only the stripped down version, i.e.
- https://github.com/LycheeOrg/Lychee/releases/download/v4.4.0/Lychee.zip, or
- https://github.com/LycheeOrg/Lychee/archive/refs/tags/v4.4.0.zip
? As you see, I am looking at our own download page for the first time of my life 😀
I downloaded from here.I don't know if I am right or wrong
this link https://github.com/LycheeOrg/Lychee/archive/refs/heads/master.zip
I can reproduce the error on Linux, too. I have not yet started to trace the bug, but it is there. I get the same error page.
OK, I guess I have found the problem. My step debugger guided me through the requirements checker and the blade template which unveiled the problem.
I introduced the bug in my attempt to make Lychee more type safe. There is a variable errors
which initially is a boolean, inside the requirements checker it is (silently) converted into an integer - using digits 0
and 1
- and the final blade template tests for unset($errors)
. :cursing_face:
The more underlying problem is that all the requirement tests and results are transferred in an associative error which is inherently not type-safe. Most of this stuff has already been replaced by a so-called DTO (data transfer object) during my re-factoring but I tried to avoid the web installer as far as possible. Obviously, it was not far enough.
I will only post a quick patch for it. Improving the installer from ground up is on my long term to-do list.
OK, I guess I have found the problem. My step debugger guided me through the requirements checker and the blade template which unveiled the problem.
I introduced the bug in my attempt to make Lychee more type safe. There is a variable
errors
which initially is a boolean, inside the requirements checker it is (silently) converted into an integer - using digits0
and1
- and the final blade template tests forunset($errors)
. 🤬The more underlying problem is that all the requirement tests and results are transferred in an associative error which is inherently not type-safe. Most of this stuff has already been replaced by a so-called DTO (data transfer object) during my re-factoring but I tried to avoid the web installer as far as possible. Obviously, it was not far enough.
I will only post a quick patch for it. Improving the installer from ground up is on my long term to-do list.
👍Good job, Thanks When can I get this fixed version 😊
We follow a four-eyes principle for our PRs on master. As soon as some of my fellow developers has revised the code, it will be merged. In this case don't expect the review to take a long time, because it is only a couple of lines with wrong comparison operators which needed to be changed. So I guess it is going to happen during the weekend.
If you are in a real hurry, you can try to fix it on your local copy using a text editor. Just change the lines as in the diff report of the PR. It is not difficult to do.
We follow a four-eyes principle for our PRs on master. As soon as some of my fellow developers has revised the code, it will be merged. In this case don't expect the review to take a long time, because it is only a couple of lines with wrong comparison operators which needed to be changed. So I guess it is going to happen during the weekend.
If you are in a real hurry, you can try to fix it on your local copy using a text editor. Just change the lines as in the diff report of the PR. It is not difficult to do.
Thanks again 😁
Steps to reproduce the issue Steps to reproduce the behavior:
download zip Run composer install --no-dev to install dependencies Copy .env.example as .env and edit it to match your parameters Generate your secret key with php artisan key:generate Go to web http://server/Lychee/public/install First screen shows Lychee-installer -> click on Next button Second screen shows error: "Please fix the errors before going to the next step." But all the checks are 'green' Clicking Re-check button does not help
Diagnostics
php artisan lychee:diagnostics
In Connection.php line 712:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lychee.users' do esn't exist (SQL: select * from
users
whereusers
.id
= 0 limit 1)In Connection.php line 368:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lychee.users' do esn't exist
System Information Lychee Version (git): master Default
composer install: --no-dev APP_ENV: production APP_DEBUG: false
System: win PHP Version: 8.1
Browser and system Server: Fedora 35/Apache Client: Windows 10 Browser: any
Where did I go wrong?
I tried to php artisan migrate then I could not open the page
and nginx REWRITE :
Diagnostics
Warning: 'D:\phpEnv\www\Lychee\public\dist\user.css' does not exist or has insufficient read/write privileges. 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
System Information
Lychee Version (release): 4.5.1 DB Version: 4.5.1
composer install: --no-dev APP_ENV: production APP_DEBUG: false
System: WINNT PHP Version: 8.1 PHP User agent: Lychee/4 (https://lycheeorg.github.io/) Timezone: Asia/Shanghai Max uploaded file size: 200M Max post size: 256M Max execution time: 0 MySQL Version: 5.7.28
Imagick: 1 Imagick Active: 1 Imagick Version: 1808 GD Version: bundled (2.1.0 compatible)
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: 0 share_button_visible: 0 import_via_symlink: 0 has_ffmpeg: 0 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