The main offender is in function MarkupToHTML in pmwiki.php. I tried
to convert it but cannot get it to work. I don't think this is an
addon.
I upgraded to the latest wiki and it works ok on php 5.4, but not the
latest PHP 7.2.12.
See below. Any help converting the function would be appreciated.
function MarkupToHTML($pagename, $text, $opt = NULL) {
# convert wiki markup text to HTML output
global $MarkupRules, $MarkupFrame, $MarkupFrameBase, $WikiWordCount,
$K0, $K1, $RedoMarkupLine, $MarkupToHTML;
$MarkupToHTML['pagename'] = $pagename;
StopWatch('MarkupToHTML begin');
array_unshift($MarkupFrame, array_merge($MarkupFrameBase,
(array)$opt));
$MarkupFrame[0]['wwcount'] = $WikiWordCount;
foreach((array)$text as $l)
$lines[] = $MarkupFrame[0]['escape'] ? PVSE($l) : $l;
$lines[] = '(:closeall:)';
$out = '';
while (count($lines)>0) {
$x = array_shift($lines);
$RedoMarkupLine=0;
$markrules = BuildMarkupRules();
foreach($markrules as $p=>$r) {
list($r, $id) = (array)$r;
$MarkupToHTML['markupid'] = $id;
if ($p{0} == '/') {
if (is_callable($r)) $x = preg_replace_callback($p,$r,$x);
else $x=preg_replace($p,$r,$x); <--************
}
elseif (strstr($x,$p)!==false) $x=eval($r);
if (isset($php_errormsg))
{ echo "ERROR: pat=$p $php_errormsg"; unset($php_errormsg); }
if ($RedoMarkupLine) { $lines=array_merge((array)$x,$lines);
continue 2; }
}
James Mikelis
Principal Technical Analyst | Staples Digital Solutions
Ph: 508.253.2016 * Fx: 508.253.7066 * 500 Staples Drive, Framingham,
MA
01702
-----Original Message-----
From: Petko Yotov <5...@5ko.fr>
Sent: Thursday, December 13, 2018 3:13 PM
To: Mikelis, James <james.mike...@staples.com>
Subject: Re: [pmwiki-users] pmwiki and Xampp
See the page
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pm
wiki.org%2FTroubleshooting&data=01%7C01%7CJames.Mikelis%40staples.
com%7C0435198fb30844f7926808d6613ed7b7%7Cb101f7ab56ac485fb3975279698fd
f7d%7C1&sdata=Nc4or9mtnwdlqGBTbgkI9j%2B0UvOg%2FJ03%2FmjzEf2A%2BAs%
3D&reserved=0
Basically,
* disable all skins and addons,
* upgrade to the most recent PmWiki version (read release notes),
* get the most recent version of every addon/recipe/module/skin you
use (read release notes),
* enable the addons one after another to see what works.
If you have any difficulty please report. We are in the process of
fixing all addons for PHP 7, if you need some that are not fixed we'll
do them first. I already see in your warnings csstooltipstogo and
attachdel, if you need those and others we'll update them.
Petko
--
If you upgrade :
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pm
wiki.org%2FUpgrades&data=01%7C01%7CJames.Mikelis%40staples.com%7C0
435198fb30844f7926808d6613ed7b7%7Cb101f7ab56ac485fb3975279698fdf7d%7C1
&sdata=y9lk%2BNh3SMgFZeSS%2FzjOuPLl85vLLHpsYgO5dpXrDNU%3D&rese
rved=0
On 13/12/2018 18:00, Mikelis, James wrote:
I recently upgraded to the latest version of pmwiki I have running on
a 5-year-old version of XAMPP.
All worked fine until I tried installing the latest version of XAMPP
because of PHP security holes in the old version XAMPP was running.
However, the latest XAMPP containing PHP 7.* breaks my pmwiki with
several errors during startup.
What can I do to resolve them? What is the supported version of PHP
pmwiki runs on? I am not sure what the below errors mean or how to
fix them. Help would be appreciated. I get more than 100 of them
during startup and my wiki does not work.
Thanks. James
Deprecated: The each() function is deprecated. This message will be
suppressed on further calls in
C:\xampp\htdocs\pmwiki\cookbook\csstooltipstogo.php on line 93
Warning: preg_replace(): The /e modifier is no longer supported, use
preg_replace_callback instead in C:\xampp\htdocs\pmwiki\pmwiki.php on
line 1777
Warning: Cannot modify header information - headers already sent by
(output started at C:\xampp\htdocs\pmwiki\pmwiki.php:1777) in
C:\xampp\htdocs\pmwiki\pmwiki.php on line 1304
Warning: Use of undefined constant ATTACH_DELETE_VERSION - assumed
'ATTACH_DELETE_VERSION' (this will throw an Error in a future version
of PHP) in C:\xampp\htdocs\pmwiki\cookbook\attachdel.php on line 34