[php-maint] Bug#481513: php5: preg_match dont find a match on a bit larger string

Bernd Hanisch bh at cocon.net
Fri May 16 15:53:34 UTC 2008

Package: php5
Version: 5.2.0-8+etch11
Severity: normal

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-amd64
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

after updating from php4 to php5 i run in problems with a few php scripts using preg_match. 

preg_match( "/<head>.*<\/head>/is", $content, $matches );

nothing special in $content. only <head> {a few chars} </head> { a lot of chars }. This only occur, if the string is larger.
I dont found the exact limit, my test file is around 126kb large. i will upload the testscript and the testfile later.
i simplified the testfile. so only the matchstrings and spaces are in.

More information about the pkg-php-maint mailing list