PHP 5.6.9, probably due to libpcre-Update in PHP
After updating from PHP 5.6.8 to PHP 5.6.9 (http://php.net/ChangeLog-5.php#5.6.9), I am encountering these errors:
Typo3 7.2.0 (installtool or backend):
#1: PHP Warning: preg_match(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 1963 in typo3_src-7.2.0/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php line 811 TYPO3\CMS\Core\Error\Exception thrown in file typo3_src-7.2.0/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 102.
Oops, an error occurred!
Typo3 6.2.12 (backend, installtool):
#1237900529: The argument "arguments" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper" InvalidArgumentException thrown in file /var/www/wrs.0711cms.de/typo3_src-6.2.12/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php in line 385.
I suspect the PHP-upgrade to pcrelib 8.37 being the cause of the Typo3 7.2-error. For the other, I really have no idea.
#3 Updated by Markus Klein over 4 years ago
Seems to be a bigger issue:
In 5.6.9 the PCRE Version was updated to 8.37 (http://php.net/ChangeLog-5.php#5.6.9) and this does not seem to play well with the swiftmailer regex.
#4 Updated by Jonas Eberle over 4 years ago
I suspect that regex-based parameter-parsing is the cause of the 6.2-issue, too.
As this happened on a live system, I quickly reverted to the older PHP-version.
Strange thing: in the currently downloadable PHP 5.6.9 http://php.net/get/php-5.6.9.tar.bz2/from/a/mirror pcre 8.36 is included, not 8.37 as announced. At least it looks like that in these files:
php-5.6.9/ext/pcre/pcrelib/config.h:317:#define PACKAGE_STRING "PCRE 8.36" php-5.6.9/ext/pcre/pcrelib/config.h:326:#define PACKAGE_VERSION "8.36" php-5.6.9/ext/pcre/pcrelib/config.h:442:#define VERSION "8.36"
I compared this with pcre's source ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ and upstream clearly states version 8.37 in these places.
I could verify on a test server (with Ubuntu, not Debian as the live system) that the problem actually does not exist with this PHP for both Typo3 v7.2.0 and Typo3 v6.2.12. This PHP is the official current PHP-5.6.9.
So to be honest I am very puzzled right now: PHP 5.6.9 does not include pcrelib 8.37 as announced (but maybe it did in an earlier download?) and I had an error that I cannot reproduce with freshly downloaded sources.
I had the error on Debian Wheezy with PHP-packages from
deb http://packages.dotdeb.org wheezy-php56 all. Unfortunately I do not have a Debian wheezy test system here where I could quickly verify. It could very well be that the problem comes down to Debian PHP patches.
Or PHP quickly withdrew pcrelib 8.37, reverted and reuploaded without version change? ;)
So maybe someone could try on a Debian to verify.
#6 Updated by Alexander Opitz over 4 years ago
Looking in the git history of PHP shows that on branch PHP-5.4 was an zupdate from pcre 8.34 to 8.36
commit 23917b451bf4029e78082b4e0a56bc4c6f117990 Author: Stanislav Malyshev <email@example.com> Date: Mon Apr 27 23:15:27 2015 -0700 Upgrade PCRE to 8.36, it fixes some crashes We probably will need to go to 8.37 once it is released.
This was merged successive to PHP-5.5, PHP-5.6 and master. After this there was a new commit.
commit 95fa72799298300f310c630a6c854f511d083bcc Author: Stanislav Malyshev <firstname.lastname@example.org> Date: Wed Apr 29 22:25:02 2015 -0700 Upgrade to PCRE 8.37 due to various bugfixes
which was also merged into the branches PHP-5.5, PHP-5.6 and master.
This second commit doesn't changed config.h of pcrelib, thats why pcrelib states it uses 8.36 instead of 8.37 and maybe they forgot more.
#8 Updated by Jochen R about 4 years ago
Same issue here with Typo3 7.2, Debian 7.8 and latest PHP 5.5.25 release
Uncaught TYPO3 Exception
#1: PHP Warning: preg_match(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 1963 in /netsite/typo3/typo3_src-7.2.0/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php line 811 (More information)
#9 Updated by Markus Klein about 4 years ago
- Priority changed from Should have to Must have
Curiously changelog 5.5.25 does not mention anything regarding regex, but PHP 5.4.41 got PCRE 8.37 as well!
Hence I suspect that the changelog for 5.5.25 forgot to mention the PCRE changes and even worse 5.4.41 is affected too!
Major problem: All PHP updates were security updates and all of them break Fluid!
#17 Updated by Andreas Fernandez about 4 years ago
dotdeb built new packages yesterday night. Can you please update to the latest version and check whether the bug still occurs?
#18 Updated by Ludwig Rafelsberger about 4 years ago
Same here. Just tried updating php to the yesterday-released dotdeb versions: The PCRE Library is now reported as 8.36. The TYPO3 errors are still there.
$ apt-cache policy php5 | grep Installed
$ php -info | grep 'PCRE Library'
PCRE Library Version => 8.36 2014-09-26
I'm on Debian Wheezy with all packages up to date and (trying to) use TYPO3 CMS 6.2.12.
#24 Updated by Alexander Opitz about 4 years ago
As it looks like, the issue only happens with php5_mod and not PHP cli we can do nothing here.
Maybe php5_mod collides with the false PCRE version number in latest PHP 5.x versions, so this should be controlled again if it is solved with PHP 5.6.10, 5.5.26, 5.4.41. If not, we can only open an issue report in PHPs bug tracking system.
#25 Updated by Dirk Wildt about 4 years ago
Don't use php package from dotdeb.org¶
Solve the TYPO3/PHP PCRE bug¶I'm using Debian Wheezy too.
I used php from dotdeb.org.
I could solve the bug:
- remove the dotdeb.org package from the source list (see snippet below)
- reinstall php5
root@gera:/# nano /etc/apt/sources.list deb http://http.debian.net/debian wheezy main ... #150910, dwildt, TYPO3/PHP PCRE bug. See: https://forge.typo3.org/issues/67048, 2- #deb http://packages.dotdeb.org wheezy-php55 all #deb-src http://packages.dotdeb.org wheezy-php55 all
#30 Updated by Jonas Eberle about 4 years ago
I can also confirm that the previous 5.5.24-1~dotdeb+wheezy.1 from dotdeb works.
It really seems that just the very latest dotdeb-Packages (5.6 and 5.5) are affected.
Do we have a simple testcase to reproduce this? Something to quickly run in the CLI or on a blank website to check? That way I could quickly produce a list of works/works not and recheck on PHP compiled from source.
#34 Updated by Markus Klein about 4 years ago
Please simply follow https://github.com/gplessis/dotdeb-php5/issues/85#issuecomment-111922723
A lot is going on there and there seems a solution on the horizon.
#35 Updated by Gilles Fouet about 4 years ago
We updated our dotdeb installation using package from the DotDeb CI ( http://ci.dotdeb.org/job/dotdeb-php5/branch/master-5.6%2Fwheezy/lastSuccessfulBuild/artifact/jenkins-dotdeb-php5-master-5.6-wheezy-11/src/ ).
After installing this 2 packages everything works fine:
#38 Updated by Frank Frewer about 4 years ago
Did someone a test with 5.5.26-1~dotdeb+7.4 (http://ci.dotdeb.org/job/dotdeb-php5/branch/master-5.5%2Fwheezy/lastSuccessfulBuild/artifact/jenkins-dotdeb-php5-master-5.5-wheezy-11/src/)?
If yes: Are the errors fixed?