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

http error 500 after upgrade #8240

Closed
1 task
mengkuan1983 opened this issue Jul 17, 2020 · 5 comments
Closed
1 task

http error 500 after upgrade #8240

mengkuan1983 opened this issue Jul 17, 2020 · 5 comments

Comments

@mengkuan1983
Copy link

Expected Behavior (or desired behavior if a feature request)

run snipe it in browser without issue after update to latest 4.9.3

Actual Behavior

http error 500


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


Provide answers to these questions:

  • Is this a fresh install or an upgrade?
    is an upgrade.
  • Version of Snipe-IT you're running
    4.9.0
  • Version of PHP you're running
    Ver 15.1 Distrib 10.1.45-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
  • Version of MySQL/MariaDB you're running
    Ver 15.1 Distrib 10.1.45-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
  • What OS and web server you're running Snipe-IT on
    Ubuntu 16.04.6 LTS webmin 1.953
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
    install.sh and php upgrade.php
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
    no
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
    index.html
  • If a stacktrace is provided in the error, include that too.
    no
  • Any errors that appear in your browser's error console.
    no

can't login to system , so i re run the upgrade.php and i got this.


STEP 1: Backing up database:

-- Starting backup...
Dumping database snipeit...
Determining files to backup...
Zipping 478 files...
Created zip containing 478 files. Size is 792.02 KB
Copying zip to disk named local...
Successfully copied zip to disk named local.
Backup completed!


STEP 2: Putting application into maintenance mode:

-- Application is now in maintenance mode.


STEP 3: Pulling latest from Git (master branch):

Git is installed.
Already on 'master'
-- -- No local changes to save
-- Your branch is up-to-date with 'origin/master'.
-- Already up-to-date.

Step 4: Cleaning up old cached files:

-- No bootstrap/cache/compiled.php, so nothing to delete.
-- Deleting bootstrap/cache/services.php. It it no longer used.
-- Deleting bootstrap/cache/config.php. It it no longer used.
-- Configuration cache cleared!
-- Cache cleared successfully.
-- Route cache cleared!
-- Compiled views cleared!


Step 5: Updating composer dependencies:
(This may take an moment.)

-- Local composer.phar detected, so we'll use that.

-- Updating local composer.phar

You are already using composer version 1.10.9 (stable channel).

Deprecation Notice: Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Http\Transformers\DepartmentsTransformer located in ./app/Http/Transformers/DepartmentsTranformer.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Notifications\RequestAssetCancelationNotification located in ./app/Notifications/RequestAssetCancelation.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression instead.
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Generating optimized autoload files
Deprecation Notice: Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Http\Transformers\DepartmentsTransformer located in ./app/Http/Transformers/DepartmentsTranformer.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Notifications\RequestAssetCancelationNotification located in ./app/Notifications/RequestAssetCancelation.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///var/www/snipeit/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
Generating optimized autoload files
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
Discovered Package: barryvdh/laravel-cors
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: eduardokum/laravel-mail-auto-embed
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/passport
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: nesbot/carbon
Discovered Package: pragmarx/google2fa-laravel
Discovered Package: rollbar/rollbar-laravel
Discovered Package: schuppo/password-strength
Discovered Package: spatie/laravel-backup
Discovered Package: tightenco/ziggy
Discovered Package: unicodeveloper/laravel-password
Package manifest generated successfully.
Generated optimized autoload files containing 4404 classes

Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
Discovered Package: barryvdh/laravel-cors
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: eduardokum/laravel-mail-auto-embed
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/passport
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: nesbot/carbon
Discovered Package: pragmarx/google2fa-laravel
Discovered Package: rollbar/rollbar-laravel
Discovered Package: schuppo/password-strength
Discovered Package: spatie/laravel-backup
Discovered Package: tightenco/ziggy
Discovered Package: unicodeveloper/laravel-password
Package manifest generated successfully.


Step 6: Migrating database:

(everything after step 6 is perfectly standard and normal)

@mengkuan1983 mengkuan1983 changed the title http http error 500 after upgrade Jul 17, 2020
@mengkuan1983
Copy link
Author

does it mean i need to upgrade carbon ?

@snipe
Copy link
Owner

snipe commented Jul 17, 2020

Should not need to upgrade Carbon, no.

Without more specific error messages from the 500 error, there isn't really a way for us to know what's happening here. Can you tell me what's in your storage/logs/laravel.log? Is it a web server level 500 or an application "whoops"-style error?

@mengkuan1983
Copy link
Author

[2020-07-17 09:41:04] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/snipeit/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/$Stack trace: #0 /var/www/snipeit/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/snipei...') #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Doctrine\\DBAL\\D...') #2 [internal function]: spl_autoload_call('Doctrine\\DBAL\\D...') #3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(63): class_exists('Doctrine\\DBAL\\D...') #4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(43): Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:host=loca...', 'snipeit', '8U7Rf0yk1PWip_t...', Array) #5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection('mysql:host=loca...', Array, Array) #6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(183): Illuminate\Database\Connectors\MySqlConnector->connect(Array) #7 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}() #8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(915): call_user_func(Object(Closure)) #9 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(940): Illuminate\Database\Connection->getPdo() #10 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(399): Illuminate\Database\Connection->getReadPdo() #11 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(325): Illuminate\Database\Connection->getPdoForSelect(true) #12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(657): Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from i...', Array) #13 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select * from i...', Array, Object(Closure)) #14 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(333): Illuminate\Database\Connection->run('select * from i...', Array, Object(Closure)) #15 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(18): Illuminate\Database\Connection->select('select * from i...', Array) #16 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\MySqlBuilder->hasTable('users') #17 /var/www/snipeit/app/Models/Setting.php(65): Illuminate\Support\Facades\Facade::__callStatic('hasTable', Array) #18 /var/www/snipeit/app/Http/Middleware/CheckForSetup.php(22): App\Models\Setting::setupCompleted() #19 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure)) #20 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #21 /var/www/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #22 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #23 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #24 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #25 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #26 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #27 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #28 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #29 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #30 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #31 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/P

@mengkuan1983
Copy link
Author

Should not need to upgrade Carbon, no.

Without more specific error messages from the 500 error, there isn't really a way for us to know what's happening here. Can you tell me what's in your storage/logs/laravel.log? Is it a web server level 500 or an application "whoops"-style error?

is tons of logs which as above.

@snipe
Copy link
Owner

snipe commented Jul 17, 2020

The version of PHP you're using is not high enough.
https://snipe-it.readme.io/docs/installation-issues#php-version-issues

As we mention on the changelog, current Snipe-IT requires PHP 7.1.3 or higher.

Snipe-IT Documentation
Common installation/upgrading issues and solutions

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

2 participants