Jump to content

Topic on Extension talk:R

Parse error: syntax error, unexpected problems with v0.12

2
83.37.45.116 (talkcontribs)

first of all, thanks for your amazing work! i've a couple of problems with version 0.12 in an Ubuntu 12.04 server with MW 1.21.1

1) The extension generates a PHP error "Parse error: syntax error, unexpected '[' in /var/www/......../extensions/R/ForbiddenCommandsR.php on line 165"

2) In the special page --> version, the expansion appears as version 0.11 and not 0.12

i've also a question: how can I change the security level to 0? I understand the risks of doing that, but i'm working on a secure enviromment

Thanks!

Sigbert (talkcontribs)

Hi,

sorry for this late answer, but I'am not very active at mediawiki.org. However, yesterday someone hinted me to this question through the mailing list r-sig-mediawiki.

Debian Wheezy uses PHP 5.4.4, but Ubuntu 12.04.3 uses PHP 5.3.10, that creates the '[' error. I have uploaded a modified version 0.12_1 which runs with R properly under Ubuntu 12.04.3. I corrected also some other problems, e.g. that 0.12 required R 2.15 or above, at least R 2.14.1 should work now.

Currently you can not activate security level 0 directly. The only possibility is to replace in ForbiddenCommandsR.php the

static $banned = array ( ... );

by

static $banned = array ();

This might be the future way for security level zero, since the aim of making an extra file was to allow for an easier fine-tuning of forbidden commands.

Reply to "Parse error: syntax error, unexpected problems with v0.12"