[pmwiki-users] Problem with install in new system - PHP 7 ?

Petko Yotov 5ko at 5ko.fr
Fri Mar 4 01:30:18 CST 2016


This function PCCF() most often registers the Markup rules that PmWiki 
will use to process the wikitext into HTML. Sometimes a typo in a markup 
rule will cause an error coming from these line numbers, even if the 
rules are defined in a recipe.

Do you have any recipes, skins or local configurations enabled on that 
wiki, or is it only the core PmWiki installation having the error?

If PmWiki without any configuration doesn't have the error, you can 
enable your recipes, one by one, and check every time if the error 
appears: you'll know that the last enabled recipe was responsible, and 
we'll help you fix it.

If PmWiki itself causes the error, I'll investigate it ASAP.

Petko

---
Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades


On 2016-02-29 12:30, Krait, Philippe wrote:
> Hi everyone,
> 
> I have run into a strange problem. I am moving my server to the latest
> version of Arch Linux. PmWiki always worked fine, but this time, when
> I try to access the site, I get a Server Error 500.
> 
> Looking at the Apache log, I have the following error:
> [Mon Feb 29 12:17:55.953427 2016] [:error] [pid 1095] [client
> 60.225.91.106:47124<http://60.225.91.106:47124>] PHP Parse error:
> syntax error, unexpected '$m' (T_VARIABLE), expecting identifier
> (T_STRING) in /home/philippe/Dropbox/Chaos/pmwiki/pmwiki.php(466) :
> run
> time-created function on line 1
> And, looking at the code, it's in a function that I don't understand at 
> all:
> function PCCF($code, $template = 'default', $args = '$m') {
>   global $CallbackFnTemplates, $CallbackFunctions;
>   if (!isset($CallbackFnTemplates[$template]))
>     Abort("No \$CallbackFnTemplates[$template]).");
>   $code = sprintf($CallbackFnTemplates[$template], $code);
>   if (!isset($CallbackFunctions[$code])) {
>     $fn = create_function($args, $code);
>     if ($fn) $CallbackFunctions[$code] = $fn;
>     else StopWatch("Failed to create callback function: ".PHSC($code));
>   }
>   return $CallbackFunctions[$code];
> 
> By the way, this is with the latest version of PmWiki, 2.2.84
> actually, in the previous version that I had, I had the same error on
> line 461 instead of 466).
> 
> I must also say that the php setup has changed a lot since my previous
> installation of Arch Linux. It is now using something called
> php7_module, instead of php5. I have tried to look at the differences,
> but honestly I am stumped, the code above is really too tough for
> me...
> 



More information about the pmwiki-users mailing list