Bug #67048
closedPHP 5.6.9, probably due to libpcre-Update in PHP
Added by Jonas Eberle over 9 years ago. Updated about 9 years ago.
0%
Description
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.
(frontend):
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.
Updated by Christian Kuhn over 9 years ago
- Target version set to 6.2.13
- Sprint Focus set to Stabilization Sprint
mmmh. needs to be takled ... added to 6.2.13 stabilization board for now ...
Updated by Markus Klein over 9 years ago
The 6.2 error sounds more like a syntax error in some Fluid template.
Where do you get this error? Upon login?
Can you maybe provide a full stacktrace?
Updated by Markus Klein over 9 years ago
http://www.pcre.org/changelog.txt Point 22
https://github.com/php/php-src/blob/master/ext/pcre/pcrelib/ChangeLog Point 14
Seems to be a bigger issue:
https://github.com/swiftmailer/swiftmailer/issues/259
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.
Updated by Jonas Eberle over 9 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.
Updated by Andreas Kienast over 9 years ago
- Status changed from New to Needs Feedback
dmaicher mentioned in this ticket that swiftmailer works fine in php-cli and is broken when using Apache.
Can you please verify whether this is your case, too?
Updated by Alexander Opitz over 9 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 <stas@php.net> 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 <stas@php.net> 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.
Updated by Alexander Opitz over 9 years ago
Created bug report about the version mismatch https://bugs.php.net/bug.php?id=69689
Updated by Jochen R over 9 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)
Updated by Markus Klein over 9 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!
Updated by Markus Klein over 9 years ago
According to https://github.com/gplessis/dotdeb-php5/issues/85 affected regex work just fine on CLI. It seems to be related to apache/mod_php
Updated by Benni Mack over 9 years ago
I had this problem with servers running dotdeb packages. can you confirm? All other instances work fine. (wheezy+dotdeb => broken, upgrade to jessie+php5.6 out of the box - no problem)
Updated by Jochen R over 9 years ago
@Benjamin Fischer: We are indeed using .deb packages
Updated by Benni Mack over 9 years ago
OK. Since the original debian packages run with 5.6.7 and not 5.6.9 they are not yet affected, that's the reason the solution worked for me.
Updated by Markus Klein over 9 years ago
Just updated my Fedora 21 dev server.
php.x86_64 0:5.6.9-1.fc21
# php -info PHP 5.6.9 (cli) (built: May 15 2015 09:17:14) PCRE Library Version => 8.35 2014-04-04
Seems that Fedora is shipping an even lower version of PCRE.
Updated by Alexander Opitz over 9 years ago
The version issue mismatch is resolved in PHP git, but I don't know if this solves the issue here.
Updated by Bernhard Eckl over 9 years ago
Same here. Debian Wheezy with Dotdeb PHP 5.6.9. Downgrade to Dotdeb PHP 5.6.8 solves the issue.
Updated by Andreas Kienast over 9 years ago
dotdeb built new packages yesterday night. Can you please update to the latest version and check whether the bug still occurs?
http://packages.dotdeb.org/dists/wheezy-php56/php5/binary-amd64/
Updated by Ludwig Rafelsberger over 9 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
Installed: 5.6.9-1~dotdeb+7.2
$ 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.
Updated by Alexander Opitz over 9 years ago
@Ludwig Rafelsberger
The PCRE Library version should be reported as 8.37. So the 5.6.9-1 package do not have this patch included. Normaly this change will be in 5.6.10.
But I don't know if only fixing version number fixes this issue.
Updated by Stefan Neufeind over 9 years ago
Since we seem to have figured out it's a problem with that pcre-version: Do you think there is simply a bug in pcre (which will be fixed) or was there some change we'd need to take care of to keep things working with newer php/pcre-releases?
Updated by Markus Klein over 9 years ago
It works with 5.6.9 on Fedora 21 here, so I don't think it's a bug in PCRE, but rather something in the debian packages.
Updated by Frank Nägler over 9 years ago
Imo the problem is located in the PHP lib, can we can do anything in the core? If not, I would prefer to remove this issue from the Stab-Board.
Updated by Markus Klein over 9 years ago
- Target version deleted (
6.2.13) - Sprint Focus deleted (
Stabilization Sprint)
We can do nothing in Core! I already checked the regex, no sane way.
It works on lower PHP versions and on current versions on non-debian. So IMHO this needs to be fixed there.
Updated by Alexander Opitz over 9 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.
Updated by Dirk Wildt over 9 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
Updated by Frank Frewer over 9 years ago
I don't know why but I can confirm that removing dotdeb php5 (5.5.25) and reinstalling the wheezy version (5.4.41-0+deb7u1) solved the problem.
Updated by Christian Kuhn over 9 years ago
confirmed issue exists with debian wheezy dotdeb 5.5.25, no issue with 5.5.24.
Updated by Dirk Wildt over 9 years ago
@Alexander
Sorry, but I don't know why it doesn't run with php from dotdeb.org and it runs with the php from default Debian packages.
Updated by Jonas Eberle over 9 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.
Updated by Frank Gerards over 9 years ago
This PHP COre bug seems fixed in all latest PHP versions now.
see e.g. http://php.net/ChangeLog-5.php#5.6.10
Updated by Alexander Opitz over 9 years ago
@Frank Gerards
Where do you see the fix inside the ChangeLog?
Updated by Christian Kuhn over 9 years ago
5.6.10 from dotdeb is still affected
Updated by Markus Klein over 9 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.
Updated by Gilles Fouet over 9 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:
http://ci.dotdeb.org/job/dotdeb-php5/branch/master-5.6%2Fwheezy/lastSuccessfulBuild/artifact/jenkins-dotdeb-php5-master-5.6-wheezy-11/src/php5-common_5.6.10-1%7Edotdeb+7.3_amd64.deb
http://ci.dotdeb.org/job/dotdeb-php5/branch/master-5.6%2Fwheezy/lastSuccessfulBuild/artifact/jenkins-dotdeb-php5-master-5.6-wheezy-11/src/libapache2-mod-php5_5.6.10-1%7Edotdeb+7.3_amd64.deb
Updated by Heiko Kromm over 9 years ago
Today I upgraded to 5.5.26-1~dotdeb+7.3, where this bug https://forge.typo3.org/issues/67048#note-6 has been fixed. But the errors still comes up.
Updated by Frederic Gaus over 9 years ago
Heiko, die you cleared all caches? Also in the install tool or even remove all files in typo3temp/Cache/ ?
Updated by Frank Frewer over 9 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?
Updated by Frank Frewer about 9 years ago
ATM I'm working with PHP Version 5.5.29-1~dotdeb+7.1: No errors
Updated by Wouter Wolters about 9 years ago
- Status changed from Needs Feedback to Closed
Not a TYPO3 error but in libpcre.