Got an interesting problem few days ago. Just updated php (and apache and some other programs) and did “/etc/init.d/apache2 graceful” when suddenly got errors in wordpress blogs like this
Warning: preg_replace() [function.preg-replace]: Compilation failed: unknown option bit(s) set at offset 0 in /path/to/wp-install/wp-includes/shortcodes.php on line 228
Code-repo showed that there were no changes for long time in shortcodes.php file, so there was like two possibilities – some new problem with php or some weird error in my server.
Got also two links from wordpress bugtracker
from where I found out, that it might be releated to libpcre. I created test.php with phpinfo(); inside and found out that php was using pcre 7.9 when in system was actually installed 8.12.
final step to discovery of problem was some page where some user complained, that he has different output of phpinfo(); in apache and on commandline. So, inspired of that, I checked out and got interesting result:
$ php --info|grep -i pcre
PCRE Library Version => 8.12 2011-01-15
also were both files pointing to right place
$ ldd /usr/bin/php | grep pcre
libpcre.so.0 => /lib/libpcre.so.0 (0xb7230000)
$ ldd /usr/lib/php5.3/apache2/libphp5.so | grep -i pcre
libpcre.so.0 => /lib/libpcre.so.0 (0xb6aba000)
So, only possible explanation could be, that apache graceful restart was not enough. When I did restart, it complained about configuration (yeah, two changes in same time, bad-bad!) – ssl port was already taken), and when I fixxed apache start-flags it started and also showed php right pcre version and problem in wordpress dissapeared.