From Howard Miller (howard.miller at udcf.gla.ac.uk) Tuesday, 30 May 2006, 11:09 PM:
I think this is a little more than a feature request. Some aspects of Moodle don't work due to bugs in early versions of PHP5. If this routine doesn't detect these problem versions then there isn't much reason to have it!
From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 31 May 2006, 01:53 AM:
currently the XML format supports the specification of this:
<BYPASS function=bypass_mysql416_reqs message=mysql416bypassed />
that specifies one function to be executed if the original test result was ok, allowing to bypass such test, showing one warning message, defined in the XML declaration or in the function itself (although it's better to define it in the XML).
If I'm not wrong, what we need here is something like:
<RESTRICT function=restrict_php50_version message=php50restricted />
that should be executed only when the original test has been positive, working exactly like the current BYPASS implementation.
How does this sound for you?
From Petr Skoda (skodak at centrum.cz) Wednesday, 31 May 2006, 04:22 AM:
Eloy, did you mean something like the attached patch?
From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 31 May 2006, 07:25 AM:
it's 99% what I was thinking (line by line)!
Just two comments:
a) There are some minor typos: resutl instead of result.
b) I was thinking about having some new str_restricted string to show the status of affected rows, just like str_bypassed to show that, originally, the test was ok, BUT something exceptional is happening....
I'll take a look to it tomorrow...just going to sleep a bit now....great job!
From Petr Skoda (skodak at centrum.cz) Wednesday, 31 May 2006, 01:29 PM:
patch updated with your comments, are we going to push it into 1.6?
From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 31 May 2006, 03:55 PM:
(I'll take a look to it this afternoon...)
+2 for 1.6, and, why not, for 1.5 and HEAD too.
The only question to decide is to determine if restricted tests must set the global result of the environment to false or no. What if somebody wants to install, ignoring restricted functions status? I can imagine a lot of servers running 5.0.x versions of PHP and we haven't published this req. until now.
Uhm, perhaps we should add another level to our XML format, calling it CLARIFY or something else that, instead of changing the result->status (like byspass or required) just add some comment (and colour) to the test.... If so, we could just inform to users instead of blocking them....
From Petr Skoda (skodak at centrum.cz) Thursday, 1 June 2006, 01:17 AM:
...adding Eloy's patch, IMHO it is ready for inclusion into STABLE
From Eloy Lafuente (stronk7 at moodle.org) Thursday, 1 June 2006, 07:00 AM:
Yep, we just need one more vote here....Martin?
Also I think we should add such code to 1.5, 1.6 and HEAD and document it somewhere in docs.moodle.org because a lot of people could have 5.0.x PHP in their servers, but I really think it's better to prevent them to use Moodle than leaving and having a bad experience/problems...
From Eloy Lafuente (stronk7 at moodle.org) Saturday, 3 June 2006, 06:18 PM:
P.S.: Re-note that this will forbid installations under PHP 5.0.x
From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 7 June 2006, 12:39 AM:
now the library itself has been added to 1.5, 1.6 and HEAD, so the RESTRICT functionality will be available.
All we need to do it to update the XML file to enable the PHP 5.0.x test if we want....
From Eloy Lafuente (stronk7 at moodle.org) Friday, 9 June 2006, 12:59 AM:
Perhaps we could, at least add such test against 1.7 to prevent users....without being 100% radical for 1.6 ?
From Eloy Lafuente (stronk7 at moodle.org) Friday, 11 August 2006, 08:34 PM:
Anything about this? Is it ok to add the 5.0.x prevention for 1.7?
From Petr Skoda (skodak at centrum.cz) Friday, 11 August 2006, 09:08 PM:
+1 from me