Error After update snipe-it ver: 4.7.2
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:
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
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
Same error, solved by updating PHP to 7.3
What screen(s) are you seeing this on? We've tested this on 7.2 and 7.3 so you shouldn't have issues.
(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)
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
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.
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
Same with the commands.
@sousa43 Are you sure you're running PHP7.2.18 in the command line version of PHP as well? Run php -v
Yes
PHP 7.2.18-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 3 2019 09:23:41) ( NTS )
@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 )
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.)

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 Yes that's right, never forget to do that!