Multiple PHP version on server creates trouble on install.

Multiple PHP version on server creates trouble on install.

by Archie Ba -
Number of replies: 4

Hi, 


I am trying to install moodle for the first time.  My server has, however, multiple PHP versions...  


Because of that, when I try to install moodle it gives me this message:


Moodle 3.2 or later requires at least PHP 5.6.5 (currently using version 5.3.3).

Please upgrade your server software or install older Moodle version.


What should I do? 


I have a webpage on a different IP that requires PHP 5.3.3  and have other IPs that are running on 5.6.3.  I have set it up in plesk Onyx so that the IP on which moodle would be on is running PHP 5.6.3 (FastCGI application served by Apache) but in the intallation of moodle, it only sees PHP 5.3.3.


I can also set it for PHP 7.1 if it helps... but currently, how do I get around the fact that it won't even install because it sees the PHP 5.3.3?


Thanks for your time and help!!


Any input appreciated.







Average of ratings: -
In reply to Archie Ba

Re: Multiple PHP version on server creates trouble on install.

by Archie Ba -

ok, well I think I found a simple way to get around this.


Since I can have multiple PHP versions but moodle uses the "php -v" one in his test.  I asked my host to upgrade the version (of the php -v) and then will use the Fast CGI for older versions.


If It doesn't work, I will be back. smile





In reply to Archie Ba

Re: Multiple PHP version on server creates trouble on install.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It's not really a Moodle problem. It just sees the version of Moodle that is there, so you need to switch it to the version of Moodle that meets the requirements. Moodle can't switch it or detect multiple versions.

In reply to Howard Miller

Re: Multiple PHP version on server creates trouble on install.

by Archie Ba -

I understand your point.  But multiple PHP versions on a server are not an uncommon thing.  


The hosting will say, well... the PHP versions are working... how come the software can't see that?  


And we go round and round.


But anywho... 



In reply to Archie Ba

Re: Multiple PHP version on server creates trouble on install.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It's not, but they always come with a command or an option or similar to switch versions. This bit is nothing to do with Moodle. 

You need to switch PHP versions using a command, putting something in a .htaccess file or by whatever method your hosting company told you - or should have told you.