Topic on Extension talk:PhpTags/Flow

CornBubbles (talkcontribs)

I am using MediaWiki 1.33

I have installed PhpTags and have this line in my LocalSettings.php:

$wgPhpTagsNamespaces = array( NS_WIDGET => true );

Then on a page (Widget:Grabber) I have this code:

<phptag> echo file_get_contents($_GET['url']); </phptag>

I save the page and view the Widget:Grabber page.

This produces the following error:

PhpTags Fatal error: Extension PhpTags is disabled for the namespace "Widget". in Command line code on line

I think the problem is in $wgPhpTagsNamespaces, but I cannot find any documentation on this wg variable.

Pastakhov (talkcontribs)

maybe NS_WIDGET is not defined when the line `$wgPhpTagsNamespaces = array( NS_WIDGET => true );` is executed by PHP. Is there any error message? try to use 274 instead of NS_WIDGET, or move the line at the end of LocalSettings.php

and file_get_contents function will not work because PhpTags designed to provide safety access to PHP features.

CornBubbles (talkcontribs)

Thanks for the 274 tip. It now says PhpTags Notice: Undefined variable: _GET in Widget:Grabber on line 2

PhpTags Fatal error: Call to undefined function file_get_contents() in Widget:Grabber on line 2 Is this a PHP error or a problem with the Extension?

Reply to "Namespaces?"