500 error after v5 upgrade on mysql 8
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug 500 error with no other logs or details
To Reproduce Steps to reproduce the behavior: Upgrade to mysql v8 then attempt upgrading from v4 to v5
Expected behavior Expected things to run normally
Screenshots If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
- Snipe-IT Version: 5.0.4
- OS: CentOS 7.8
- Web Server: Apache 2.4.46
- PHP Version: 7.3.22
- MySQL Version: 8.0.21
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Version: 86
Error Messages
- WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
- Include any additional information you can find in
storage/logsand your webserver's logs.
Debug is turned on, no errors show in browser, nor browsers console, nor storage/logs
Additional context
- Is this a fresh install or an upgrade?
- What OS and web server you're running Snipe-IT on
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
- Include what you've done so far in the installation, and if you got any error messages along the way.
- Indicate whether or not you've manually edited any data directly in the database
Upgrade via Git No error messages after updating upgrade.php Have not manually edited the database Confirmed permissions for storage directory is correct
Add any other context about the problem here.
Accidentally upgraded mySQL to v8 without checking if Snipe could use it several months ago, so I had tried upgrading to the develop branch of v5. But consistently ran into a 500 error with no other logs or details. Hoped once v5 launched it would fix things.
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
I know there isn't a lot to go on as I don't seem to get actual error messages :(
Hm. Without errors, this is going to be pretty tough to troubleshoot
So in the name of testing I just tried a brand new install on my cPanel VPS, after going through all the steps, I'm still met with a 500 error before even being able to do the pre-flight.
When attempting composer clear-compiled I get the following
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "clear-compiled" is not defined.
Okay might have found something here in /var/log/apache2/error_log
[Fri Nov 13 11:07:03.176928 2020] [:error] [pid 19270:tid 46981089195776] [client 172.x.x.x:53220] SoftException in Application.cpp:267: File "/home/user/snipe-it/public/index.php" is writeable by group
[Fri Nov 13 11:07:03.176995 2020] [core:error] [pid 19270:tid 46981089195776] [client 172.x.x.x:53220] End of script output before headers: index.php
AH! Okay found another issue that pointed to this, and that's the issue, after setting public to 755 and public/index.php to 644, and snipe-it as a whole to 755 that cleared the 500 error.
Went back to my original install, changed public/index.php to 644, the login prompt came up, and we're good again.