snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Error After update snipe-it ver: 4.7.2

Open sousa43 opened this issue 7 years ago • 13 comments

Actual Behavior

After update to 4.7.2 from 4.6.18

Browser: Error Server HTTP Error 500

Log (/var/log/apache2/snipeIT.error.log):

[Wed May 29 14:10:03.169937 2019] [:error] [pid 2028] [client 192.168.10.69:44734] PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/snipeit/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 24 [Wed May 29 14:10:03.170017 2019] [:error] [pid 2028] [client 192.168.10.69:44734] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0 [Wed May 29 14:10:03.170690 2019] [:error] [pid 2028] [client 192.168.10.69:44734] PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/snipeit/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 24 [Wed May 29 14:10:03.170748 2019] [:error] [pid 2028] [client 192.168.10.69:44734] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0


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? -> Update
  • Version of Snipe-IT you're running -> 4.7.2
  • Version of PHP you're running -> 7.2.18-1
  • Version of MySQL/MariaDB you're running -> MariaDB 10.1.16
  • What OS and web server you're running Snipe-IT on -> ubuntu server 16.10
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) -> install.sh
  • Any errors that appear in your browser's error console. -> No
  • Indicate whether or not you've manually edited any data directly in the database ->No

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

https://snipe-it.readme.io/docs/getting-help

sousa43 avatar May 29 '19 13:05 sousa43

Same error, solved by updating PHP to 7.3

mnocerino avatar May 29 '19 15:05 mnocerino

What screen(s) are you seeing this on? We've tested this on 7.2 and 7.3 so you shouldn't have issues.

snipe avatar May 29 '19 17:05 snipe

(You shouldn't need PHP7.3 for this update, IIRC. I specifically didn't upgrade us to Laravel 5.6-5.7 to keep the PHP requirement lower, but perhaps I'm mistaken.) I did the upgrade development work on 7.2.13 and tested on 7.3.0 as well)

snipe avatar May 29 '19 17:05 snipe

Also, the nullable type (which typically triggers that error) was introduced in PHP 7.1, so not sure why you'd be seeing that with 7.2.18: https://php.net/manual/en/migration71.new-features.php

snipe avatar May 29 '19 17:05 snipe

I was in php 7.0 and was giving error and upgraded to php 7.2 and it is still in the same. The error is appeared on my snipe-it home page. Sorry for my english.

sousa43 avatar May 29 '19 17:05 sousa43

You may need to clear your caches, etc. I can understand why you'd see it in 7.0. The upgrade states that it requires 7.1.3 or better for exactly this reason (a requirement of the underlying framework and dependencies). Try running the commands listed here: https://snipe-it.readme.io/docs/common-issues#section-quick-tip-handy-commands

snipe avatar May 29 '19 17:05 snipe

Same with the commands.

sousa43 avatar May 29 '19 17:05 sousa43

@sousa43 Are you sure you're running PHP7.2.18 in the command line version of PHP as well? Run php -v

snipe avatar May 29 '19 17:05 snipe

Yes PHP 7.2.18-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 3 2019 09:23:41) ( NTS )

sousa43 avatar May 29 '19 18:05 sousa43

@snipe I did update from 7.2.18-1 to 7.3.5-1 and it's working.

PHP 7.3.5-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 3 2019 10:00:05) ( NTS )

sousa43 avatar May 30 '19 09:05 sousa43

Glad to hear you're all sorted! In the future, if you've resolved your issue, please try to remember to close your ticket - it helps us out a lot. (We have to manage a lot of tickets.)

tenant-tyvm

snipe avatar May 31 '19 02:05 snipe

Same issue for me. Even not working after upgrading from an old php7.0 version to 7.3.5 Because Apache was still using the old one.

Resolved by reconfiguring apache2.

sudo a2dismod php5.6 php7.1 php7.0 ## or your old unssuported version sudo a2enmod php7.3 ## or your version which is supported sudo service apache2 restart

Xeon131 avatar Jun 08 '19 11:06 Xeon131

@Xeon131 Yes that's right, never forget to do that!

sousa43 avatar Jun 08 '19 11:06 sousa43