[pmwiki-devel] PHP Deprecated: preg_replace() /e warning in pmwiki.php on line 1698

Randy Brown randy at brownragfilms.com
Wed Sep 30 17:04:46 CDT 2015


Not all PmWiki recipes are PHP 5.5 compatible - even their latest versions. You can check the PHP 5.5 compatible list here: http://www.pmwiki.org/wiki/PmWiki/PmWiki?action=search&q=link%3DCategory.PHP55 <http://www.pmwiki.org/wiki/PmWiki/PmWiki?action=search&q=link=Category.PHP55>

Of course, not being on the list doesn’t mean a recipe isn’t compatible - it just means that no one has yet documented that it is compatible.

If you are using PmWiki version 2.2.79, then something in your configuration file or in a recipe probably is almost certainly using a /e modifier. Sometimes it may not be obvious in the code without close inspection. (I recall some discussion of making an easy way to track down the problem, but I don’t recall if that ever came to fruition.) 

The way I would track the problem down is to comment out the include_once statements for each of your recipes, and one by one uncomment them, looking only for when the warning messages start to appear. Once you’ve identified the culprit (hopefully there is only one), you can ask the recipe author to update it to be compatible with PHP 5.5. If you want to try to fix the problem yourself, you may want to read:

http://www.pmwiki.org/wiki/PmWiki/Troubleshooting <http://www.pmwiki.org/wiki/PmWiki/Troubleshooting>

and

http://www.pmwiki.org/wiki/PmWiki/CustomMarkup#php55 <http://www.pmwiki.org/wiki/PmWiki/CustomMarkup#php55>

Good luck, and write back if you need more help.

Randy

> On Sep 30, 2015, at 4:45 PM, W Randolph Franklin <pmwiki at wrfranklin.org> wrote:
> 
> 
> My server is getting thousands of these warnings:
> 
> PHP Deprecated: preg_replace(): The /e modifier is deprecated,
> use preg_replace_callback instead in
> .../pmwiki/pmwiki.php on line 1698
> 
> I am running pmwiki-2.2.79.  SFAIK, none of my cookbook recipes
> use '/e', and all are the latest version.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20150930/a5e1d5e7/attachment.html>


More information about the pmwiki-devel mailing list