[pmwiki-users] Error messages: The /e modifier is deprecated...

Petko Yotov 5ko at 5ko.fr
Sun Feb 16 01:25:47 CST 2014

Wolfgang Faust writes:

> « HTML content follows »
> My PmWiki installation is outputting a lot of error messages like the  
> following:
> Deprecated: preg_replace(): The /e modifier is deprecated, use  
> preg_replace_callback instead in /var/www/wolf- 
> new/public_html/pmwiki/pmwiki.php on line 1662
> This error was supposedly fixed in version 2.2.56; I'm running the latest  
> (2.2.61). I presume that this error message is the result of some  
> customization I have, but I don't know enough about the internals of PmWiki  
> to find out what. How do I track down what is causing this error?

First, double-check you have updated all core files, pmwiki.php and all  
files in the scripts/ directory.

See also if in your cookbook and pub/skins directories you have the latest  
recipes and skins that were published by their maintainers on  

Next, in config.php disable all recipes: included files from the cookbook  
directory, or a custom skin, or any line starting with "Markup(". You can  
insert # at the beginning of a line to disable it.

Then test the wiki: if you have disabled everything, the warning message  
should disappear.

Next, re-enable your customizations one after another, each time testing the  
wiki. If at some point the warnings re-appear, you'll know that the  
customization you just enabled is not compatible with PHP 5.5.

You can contact the authors of the broken recipes and (kindly) ask them to  
update their recipes for PHP 5.5 - recent PmWiki versions add new helper  
functions which make it easy. See http://pmwiki.org/CustomMarkup .

If you cannot have the recipes fixed by their authors, tell us and we'll try  
to fix them.

Note that many hosting providers allow you to run different versions of PHP.  
See the documentation of your hosting plan to learn how to enable a PHP  
version earlier than 5.5.

Finally, it is possible to suppress these warnings in PHP 5.5, by setting  
this line at the beginning of config.php:

  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

This will work, but should be a temporary solution, left only until your  
recipes are fixed.


More information about the pmwiki-users mailing list