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

Docker: outdated PHP? #8314

Closed
2 tasks done
Smankusors opened this issue Aug 12, 2020 · 9 comments
Closed
2 tasks done

Docker: outdated PHP? #8314

Smankusors opened this issue Aug 12, 2020 · 9 comments

Comments

@Smankusors
Copy link

Smankusors commented Aug 12, 2020

Please confirm you have done the following before posting your bug report:

Describe the bug
I read the Dockerfile that you guys are still using PHP 7.1

snipe-it/Dockerfile

Lines 9 to 18 in e0644db

libapache2-mod-php7.1 \
php7.1-curl \
php7.1-ldap \
php7.1-mysql \
php7.1-mcrypt \
php7.1-gd \
php7.1-xml \
php7.1-mbstring \
php7.1-zip \
php7.1-bcmath \

According to the PHP documentation, this version is no longer supported, so I recommend to upgrade PHP to PHP 7.4.

Another reason? Yes, I can't run PHP 7.1 because my DB are MySQL 8.0. And here's the problem,

Illuminate\Database\QueryException thrown with message "SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = db_snipe and table_name = users)"

Previous exceptions
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (2054)
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (2054)
PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] (0)

I believe this is similiar to YOURLS/containers#50.

To Reproduce
Here just use this docker compose to reproduce

version: '3'

services:
  snipe-it:
    image: snipe/snipe-it:v4.9.4
    environment:
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_ROOT_PASSWORD=example
      - MYSQL_DATABASE=snipeit
      - MYSQL_USER=root
      - MYSQL_PASSWORD=example
      - APP_DEBUG=true
      - APP_KEY=base64:R4yKHxalPFHv6jPRer3tNBnG3Nug2FKxvPOPyPJTzrI=
    ports:
      - "192.168.9.35:3051:80"
    volumes:
      - ./data:/var/lib/snipeit
  mysql:
    image: mysql:8
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=example
      - MYSQL_DATABASE=snipeit

Expected behavior
Runs normally

Screenshots
I think... this is already clear enough.

Tested Docker image tags

  • latest (DIGEST:sha256:49ac7d27637d0866d1e5cef5aceb92e2e4f19690133db5213e8c5b5ad76cd0df)
  • develop (DIGEST:sha256:c6ec9e85a75b9660d622e9c52dc898bd0c4d7e74090236b82d0b0fc1790165c3)
  • snipe/snipe-it:v4.9.4
  • snipe/snipe-it:v5.0.0-beta-2

Additional context
I could do PR if you want to upgrade the image to PHP 7.4 btw. Also I see that v5 is already upgraded to PHP 7.2, but it's still same as issue I mentioned. And it's fixed after I upgraded it to PHP 7.4.

Eh wait, I read #6701 and it seems I run out of luck run this with MySQL 8, even if this fixed?

@uberbrady
Copy link
Collaborator

We probably wouldn't take the PR against v4, but we would probably take a PR for v5 - but only after it's released. We're all hard at work on getting that done. If you wanted to make one now, and target it against develop branch that would be great. I'm intending to go through a lot of our open PR's and start getting them landed against v5 once we have a stable initial release - we're trying not to bundle too many different things together all at once for the initial version.

@Smankusors
Copy link
Author

hmm it seems I will wait until the v5 is stable...

meanwhile I will use MySQL 5.7 temporary... 🤔

@uberbrady
Copy link
Collaborator

uberbrady commented Aug 12, 2020

You can certainly do that of course, but it also looks like there are some tweaks you can do to your MySQL server that might help it to work - https://mysqlserverteam.com/upgrading-to-mysql-8-0-default-authentication-plugin-considerations/

MySQL Server Blog
If you are upgrading your server to MySQL 8.0 and observe that your application is experiencing error related caching_sha2_password plugin, it is likely because your clients/connectors does not (ye…

@stale
Copy link

stale bot commented Oct 12, 2020

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

@stale stale bot added the stale label Oct 12, 2020
@Smankusors
Copy link
Author

the beta still uses PHP 7.2 in the docker image, so yeah it's still relevant.

@stale
Copy link

stale bot commented Oct 12, 2020

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

@stale stale bot removed the stale label Oct 12, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

@stale stale bot added the stale label Dec 25, 2020
@Smankusors
Copy link
Author

sorry, I haven't checked the stable v5 yet. I will check on it later

@stale
Copy link

stale bot commented Dec 25, 2020

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

@stale stale bot removed the stale label Dec 25, 2020
@snipe snipe closed this as completed Jul 20, 2022
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

No branches or pull requests

3 participants