Installing and upgrading help

PHP version reports incorrectly when running Antelope/Barracuda fix

 
Picture of Nick Varney
PHP version reports incorrectly when running Antelope/Barracuda fix
 

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?


 
Average of ratings: -
Picture of Howard Miller
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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?

 
Average of ratings: -
Picture of Nick Varney
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
 

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.,,



 
Average of ratings: -
Picture of Howard Miller
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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 wink

 
Average of ratings: -
Picture of Nick Varney
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
 

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?

 
Average of ratings: -
Picture of Ken Task
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
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


 
Average of ratings: -
Picture of Howard Miller
Re: PHP version reports incorrectly when running Antelope/Barracuda fix
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Moodle 3.4 *requires* PHP 7 so, yes, PHP 7 is the way to go. 


 
Average of ratings: -