PHP version reports incorrectly when running Antelope/Barracuda fix

PHP version reports incorrectly when running Antelope/Barracuda fix

av Nick Varney -
Antall svar: 6

Hi,

I'm running Moodle 3.3.2 on IIS Windows 2008 R2. PHP v5.6.15

Was upgrading to 3.3.3 yesterday. Upgrade went fine but received the Antelope/Barracuda db tables check message in the Environment screen.

So I began the process of identifying the tables in question that I've always followed. 

In doing so in the command line I receive the message that Moodle 3.2 or later requires at least PHP 5.6.5 and I am running 5.6.0 so cannot proceed!!?


Command line image


Environment in Moodle (during upgrade and before) shows I am running PHP 5.6.15.


Environment


PHP Manager in IIS shows I am running 5.6.15.

I am running Moodle 3.3.2 which requires at least PHP 5.6.5

I even upgraded PHP to 5.6.32 and still the mysql_compreseed_rows_php reports back that I am running 5.6.0?

I rolled back the upgrade (which was probably unnecessary since I don't have any massive courses that require Barracuda) but wanted to err on the side of caution.


Any ideas why this command line task is reporting too low a level?


Gjennomsnittlig vurdering: -
Som svar til Nick Varney

Re: PHP version reports incorrectly when running Antelope/Barracuda fix

av Howard Miller -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

Are you sure you upgraded the command line PHP version as well (it is separate from the 'web' version).

Please run...

php -i | grep 'PHP Version'


(or whatever the Windows equivalent is - the version should be near the top of the 'php -i' output)

...what does it say?

Som svar til Howard Miller

Re: PHP version reports incorrectly when running Antelope/Barracuda fix

av Nick Varney -

Thanks Howard.

Ah, so the windows server has its own PHP separate from that which IIS is managing. I'm showing my ignorance of that fact here.

I can see in C:\Program Files (x86)\PHP I have a v5.6 folder. Presumably this is v5.6.0 and is what Windows is using.


I need to figure out determining the windows version of grep as it's coming back as unrecognised as a command.,,



Som svar til Nick Varney

Re: PHP version reports incorrectly when running Antelope/Barracuda fix

av Howard Miller -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

The grep is only to find the version line amongst loads of output from 'php -i'. I've just realised that

php --version

...should be even better. 

Sorry - know next to nothing about Windows blunker

Som svar til Howard Miller

Re: PHP version reports incorrectly when running Antelope/Barracuda fix

av Nick Varney -

Right, it was:

php -v

Which tells me that indeed my Windows box is running PHP v5.6.0


So I need to upgrade my Windows PHP to beyond v5.6.5 to at least be able to continue with the Antelope>Barracuda table format change?


Further Q. Does my 'Windows' PHP need to be running PHP v7 in order to run Moodle 3.4 and beyond (in which case I can look into that now) or can I limit the upgrades needed to just the PHP that IIS runs?

Som svar til Nick Varney

Re: PHP version reports incorrectly when running Antelope/Barracuda fix

av Ken Task -
Bilde av Particularly helpful Moodlers

Pardon intrusion ...

https://docs.moodle.org/dev/Moodle_and_PHP7

think I'd try to 'future proof' the environment for future versions of Moodle as much as possible.

Having said that, however, it is possible that won't work as much depends on plugins/addons running as it mentions in the URL above - in other words, are the plugins compat with higher version of PHP.

And, have discovered the check for Antelope/Barracuda actually looks at the global config of the DB server - as opposed to the database being used for the moodle instance.    As long as the db user in config.php has the ability to alter the database, then one could alter the database for a specific instance of moodle to be in compliance with DB requirement of character set and collation.

'spirit of sharing', Ken