snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.08k stars 3.18k forks source link

HTTP Error 500 #12177

Open EligorStarfield opened 1 year ago

EligorStarfield commented 1 year ago

Debug mode

Describe the bug

When i try open my SnipeIT portal i receive the HTTP Error 500.

I need to upgrade my PHP version. I had PHP 7.4 and i did the upgrade to PHP 8.0 but now i don't know what it's happening to my SnipeIT.

Reproduction steps

  1. N/A
  2. ...

Expected behavior

Open correctly...

Screenshots

No response

Snipe-IT Version

I don't remember it

Operating System

Ubuntu

Web Server

Apache

PHP Version

8.0

Operating System

Windows

Browser

Google Chrome

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Logs on my Ubuntu server:
Fri Nov 25 13:58:42.169975 2022] [proxy_fcgi:error] [pid 1250] [client 192.168.0.250:64254] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php:811\nStack trace:\n#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(811): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()\n#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(780): Illuminate\\Container\\Container->resolveDependencies()\n#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\\Container\\Container->build()\n#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\\Container\\Container->resolve()\n#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(732): Illuminate\\Container\\Container->make()\n#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(256): Illuminate\\Foundatio...PHP message: PHP Fatal error:  Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php:811\nStack trace:\n#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(811): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()\n#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(780): Illuminate\\Container\\Container->resolveDependencies()\n#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\\Container\\Container->build()\n#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\\Container\\Container->resolve()\n#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(732): Illuminate\\Container\\Container->make()\n#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(256): Illuminate\\Foundatio...'

Additional context

No response

welcome[bot] commented 1 year ago

👋 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.

snipe commented 1 year ago

What version of Snipe-IT are you using? How did you upgrade? Snipe-IT v6.0.13 does work on PHP8.

EligorStarfield commented 1 year ago

What version of Snipe-IT are you using? How did you upgrade? Snipe-IT v6.0.13 does work on PHP8.

There's another way to see my Snipe-IT version on my Ubuntu server? I can't access to Snipe-IT to see my version for obvius reasons hehe.

ccj9874 commented 1 year ago

Error 500 might be a permissions error. Check the wiki for debugging that. When installing PHP 8, make sure to disable 7.4 and enable 8.0 or 8.1. I don't know the commands off the top of my head but you should be able to look them up

tsatrom commented 1 year ago

I just had the same issue and I restored my virtual machine until I have time to tackle it again. Did you ever figure it out? I do recall having some permission errors with the "storage" folder which I fixed but the 500 error was still there. Let me know what you figured out. Thanks!

ccj9874 commented 1 year ago

I ran all of the commands at the bottom of this page, in the Fixing It section. https://snipe-it.readme.io/docs/debugging-permissions

Snipe-IT Documentation
Debugging Server Permissions
One of the most common issues folks newer to running web servers run into is how to manage the Linux/Windows/etc owners and groups of the Snipe-IT filesystem. As we mention many times in the installation documentation, nothing in Snipe-IT should be run as or owned by root. Running composer as root, ...
tsatrom commented 1 year ago

Thank you!

snipe commented 1 year ago

There's another way to see my Snipe-IT version on my Ubuntu server?

config/version.php