Extension talk:SecurePHP

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Source Code Security

My largest concern with the extension currently is the ability of others to view the source code for my PHP. Once the extension is completed to lets say version 1.0 will this be remedied? 74.12.197.15 04:50, 5 September 2007 (UTC)

You can install Extension:ViewsourceRight to manage this permission. Jean-Lou Dupont 04:57, 5 September 2007 (UTC)
There is also the Raw right to take care, plus the search engine etc. If you really want to have finer grained control over permissions, then use Extension:BizzWiki. Jean-Lou Dupont 05:40, 5 September 2007 (UTC)

[edit] Running PHP Scripts

It appears that the PHP script only runs when the page is edited. Is that correct? Do you know of any way to get the script to run more often, perhaps a bot? Csquest99 17:03, 30 July 2008 (UTC)

I found the answer to my own question. By appending "?action=purge" to the end of the URL, it should rerun the PHP script when it rebuild the page. See Manual:Purge for related instructions Csquest99 17:54, 30 July 2008 (UTC)

[edit] Include?

I can' get it work to include a php file: <runphp>include 'http://something.com/index.php';</runphp> and all kind of variations. Page where it's added is protected correctly etc. since i can run <runphp>echo 'bla';</runphp> properly. Any idea? --Subfader 17:38, 30 July 2008 (UTC)

[edit] Parameters to the script

How can I get Parameters from the Wiki to the script? With ParserPhase2 it is only possible to get Wiki-Constants to the Script like {{PAGENAME}}. -- anonymous 10.09.2008

Use the PHP statement global to refer to global variables of Mediawiki. Jean-Lou Dupont 12:33, 10 September 2008 (UTC)
Maybe you can help me doing it, I am new to it and haven't found the way yet. Another way: If I understand your Code of SecurePHP right, the "&$params" are not given to the execute-Code, if had done, the Parameters could be given as HTML-Params to the PHP-Code? (I use runPHP as a wrapper für Smarty, so runPHP is used in a template with Parameters) -- anonymous 21.09.2008
I wrote this extension moons ago (i.e. I was a PHP-newbie then) and now looking at it, I can see how I could improve it quite a lot: yes the $params can be passed to the eval. Jean-Lou Dupont 13:46, 24 September 2008 (UTC)

[edit] Creating wiki links using PHP

If we need to use PHP to populate a page with wiki links, how can we do it? As a test, using something like this:

echo "[[test]]";

It just prints [[test]], it does not create a wiki link. Any ideas?

  • I really need an answer to this question as well..
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox