# Why PHP 5.3.6 gets compiled with old PCRE lib?



## piotrek (Jun 5, 2011)

I have this problem with my Mediawiki that stopped working after I upgraded few ports one day.

It just keeps saying:

```
Warning: preg_replace_callback(): Compilation failed: unknown option bit(s) set at offset 0 in [....]/includes/MagicWord.php on
 line 371
```

I've been looking for a solution and I suspect that it has something to do with PCRE extension, which (AFAIK) is included into PHP's core in 5.3.6.

So I cleaned and rebuilt php5 several times already, but when I do phpinfo() it still says:

```
PCRE Library Version 8.00 2009-10-19
```

In my system I have only PCRE 8.12, so how can it build it with 8.00?


----------



## piotrek (Jun 5, 2011)

Oh, never mind - suddenly it started showing 
	
	



```
PCRE Library Version 8.12 2011-01-15
```
Sorry.

But I still get the errors from my mediawiki - any ideas how to solve it?


----------



## tingo (Jun 5, 2011)

What version of MediaWiki are you running?


----------



## piotrek (Jun 5, 2011)

I was running some older one (I believe 1.14), but after your question I have tried 1.16.5.. and this one works fine 

Thanks, tingo!


----------



## piotrek (Jun 5, 2011)

No, I don't get it. Now it works even with the old one. Something really strange is going one here.

What I did before, I recompiled php5 core, after removing the line with "--with-pcre-regex" from the Makefile. I found such advice googling for a solution. But then I restarted Apache and it did not help - I was still getting this error on my browser.

And now, after one more hour or so it seems like removing "--with-pcre-regex=" actually helped. I guess it was just my browser, showing the page from the cache - cannot explain it otherwise.


----------

