Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.7.3, 1.8.3, 1.9
-
Component/s: Unknown
-
Labels:None
-
Environment:PHP 5.2.4
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Description
I was trying to detect why one MSSQL server was causing a lot of problems with simple SQLs when I've discovered that the root of the problem was that one preg_match_all() function wasn't performing its job under BIG texts.
I've attached one script (preg_match_all_test.php) that reproduce the problem in my system. Curiously, the limit seems to be 99998 chars. By adding one more char (99999) the function doesn't work properly.
It's a major problem because it can break tons of things (the mssql_n driver, backup & restore relinking, filters...) potentially anything trying to grep over more than 99998 chars.
Please, can you execute the script and add your results here? TIA!
Attachments
Issue Links
| This issue is duplicated by: | ||||
| MDL-11502 | HTML files will not display if >100KB and filteruploadedfiles setting is set to "HTML files only" or "All files" |
|
|
|
Some results:
PHP: 5.2.4
OS: Darwin mbp 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386
ERROR, preg_match_all() has NOT been able to capture one text of 99999 bytes.
PHP: 5.1.6
OS: Darwin mbp 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386
OK, preg_match_all() has been able to capture one text of 99999 bytes.
PHP: 4.3.10
OS: Darwin mbp 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386
OK, preg_match_all() has been able to capture one text of 99999 bytes.