snipe / snipe-it

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

PHP Version Error #15456

Closed larrygyamfi closed 2 months ago

larrygyamfi commented 2 months ago

Debug mode

Describe the bug

When trying to update SnipeIT to the latest version using php upgrade.php script, the process fails at step 2 with the message of an incompatible version of PHP. The version displayed in the error message does not match with the version that is installed on the machine and the version that is displayed on our SnipeIT instance.

Reproduction steps

  1. Open Powershell
  2. Navigate to web root folder
  3. run php ...

Expected behavior

I expected the upgrade process to continue uninterrupted like our previous upgrades.

Screenshots

Error: image

IIS: image

SnipeIT: image

Snipe-IT Version

6.3.0

Operating System

Windows Server 2019

Web Server

IIS

PHP Version

8.1.27

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No Error Messages

[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
fileinfo
filter
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
soap
sodium
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

Additional context

Upgrade

snipe commented 2 months ago

Check that your command line version of PHP is 8.1.x as well. php -v

larrygyamfi commented 2 months ago

Thank you, i ran php -v and got PHP 8.0.27. How would i go about updating the command line?

snipe commented 2 months ago

I don't really use Windows, but this tutorial seems like it's pretty up to date. https://www.tutorials24x7.com/php/how-to-install-php-8-on-windows

Tutorials24x7
How To Install PHP 8 On Windows | Tutorials24x7
Unlock the full potential of PHP 8 on your Windows system with our comprehensive guide. Master the installation process and start coding efficiently today.
larrygyamfi commented 2 months ago

That did it. Thank you!