Archive for March 21st, 2007

PHP 4.4.6 and preg_match() – or: PCRE 7.0 sucks

Wednesday, March 21st, 2007

php-med-trans-light.gifWith the release of PHP 4.4.6 on March 1st PHP developers updated the PCRE version that’s included in the PHP4 tarball from PCRE 6.7 to PCRE 7.0. Unfortunately PCRE 7.0 has “some issues” with certain regular expressions – if you have recently upgraded to PHP 4.4.6, use regular expression functions such as preg_match and are wondering about strange “Internal Server Error” messages or empty pages – stop wondering. It’s a more or less documented “bogus” bug at php.net (Bugtracker, ID 40706) that they won’t fix because it’s within PCRE and not within PHP. Their solution? Upgrade to PHP 5.
You can’t? Well you can use PCRE 6.7 of the “old” PHP 4.4.5 version with PHP 4.4.6. Just follow the steps below. 🙂

(more…)