PHP 8.1 is showing PHP Version 8.0.9 For an Nginx on WIndows 11 setup, I upgraded php to 8.1. I got it from:
https://windows.php.net/download#php-8.1 site
It showed PHP 8.1 (8.1.0), VS16 x64 Non Thread Safe (2021-Nov-23 22:22:08), Zip [29.12MB]
All works fine, but phpinfo(); shows it to be php 8.0.9, any ideas, thanks.
What about cli? Is that 8.1?
@Sinnbeck running php -v shows:
PHP 8.1.0 (cli) (built: Nov 23 2021 21:48:28) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
But wouldn't the phpinfo(); be the one to go by for web? I know cli can be different version.
@jlrdw yup. Just figured it would be good to check if the update actually went through. What webserver are you running? Might need a restart
@Sinnbeck nginx, it was off when I extracted the newer php zip file. Is the phpinfo() suppose to be accurate?
I stopped all and restarted all, but same results.
@jlrdw yeah it should. But maybe you have both versions installed. At least on Linux that's possible. There i would change nginx to point fpm to the correct php sock
@jlrdw Have you updated the fast-cgi to php 8.1 as well?
@Sinnbeck all is setup correct. 8.1 is too new to get many web answers, like stackoverflow.
All I did was literally extract the zip archive, copied the development ini file to php.ini, and uncommented needed extensions, same way I always do.
Like I said everything is working fine, it's just showing that older version.
@jlrdw weird. Linux I would open the nginx site conf file and change this line. But windows is probably different
fastcgi_pass unix:/run/php/php8. 0-fpm.sock
@Sinnbeck @tray2 in windows its:
location ~ \.php$ {
include "fastcgi.conf";
root www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
And to start cgi it's:
php-cgi.exe -b 127.0.0.1:9000 -c /php/php.ini
The previous version showed correctly.
Edit
@tray2 the link you gave guided me, silly me I forgot to un-comment the ext folder.
@sinnbeck thanks for your replies also, appreciated. phpinfo now shows correct.
Please sign in or create an account to participate in this conversation.