Extension talk:PieceOfCode

Security
Could this pose a security risk as they can specify a malicious URL or would it only show the harmless source code? --72.211.252.69 23:06, 3 September 2011 (UTC)

Does it works with MW 1.22
Hi! I installed the extension, but when I open any wiki webpage, there is only blank page on browser.

How can I debug what is happening ? // the directory case is correct (not camelcase)
 * 1) require_once("$IP/extensions/pieceofcode-dr/PieceOfCode-dr.php");
 * To debug you should enable php to prompt messages or read its logs. But I already gave it a try and I found a few issues with deprecated functions in MW1.22 and some globals. I've just generated a version 0.2 with bugfixes and it's available in section Downloads. I hope it helps you and thanks for trying this extension. --Daemonraco (talk) 00:36, 28 January 2014 (UTC)

DR_PieceOfCode Error: Unable to retrieve file information
Hi!

The following message is shown when I try to use the extension: "DR_PieceOfCode Error: Unable to retrieve file information (MyProject>/PROD/trunk/...".

I think I am missing something from configuration. I have verified the following itens: http://10.10.10.1/svn/PROD/trunk/.../XXX.java connection=MyProject file=/PROD/trunk/.../XXX.java
 * I can access with a browser, the svn file with a URL like:
 * The previous URL asks for username/password. That credentials are the same as configured on LocalSettings.
 * The credentials are readonly.
 * On LocalSettings I configured MyProject as "http://10.10.10.1/svn" (without the end slash)
 * The wiki page is configured with:
 * I have svn on path "/usr/bin/svn"

Is there anything more I can check for mistakes ?

Just a few checks

 * Based on your comments, I guess you are using a *nix system. if you run "/usr/bin/svn info http://10.10.10.1/svn/PROD/trunk", does it bring you information or an error? (should be information).
 * Remember to run this using you web user. A default ubuntu usually uses 'www-data'.
 * I found some troubles with $wgEnableUploads related with this extension, so I recommend you set to "true" this variable $wgPieceOfCodeConfig["enableuploads"] on your LocalSetting.php
 * It should be after the require_once sentence for this extension.
 * $wgUploadDirectory seems to have a similar issue, so I recommend to use something like this:

$wgPieceOfCodeConfig["uploaddirectory"] = "//images/PieceOfCode";
 * Make sure this directory exists.
 * Also make sure the web user is allow to write in there. 'chmod 0777' is enough, but don't forget about security.
 * There's also a security check on PieceOfCode which requires upload permission for the user been used to tag.
 * This extension finally uses a passthru command, check if this is not disable by you apache configuration (if you use apache).
 * At this point, if it works and it looks weird, just remember to activate the extension SyntaxHighlight_GeSHi.
 * Daemonraco (talk) 00:59, 12 February 2014 (UTC)

Bingo! It works !!!

 * Done all items on your checklist.
 * Also, added to file "/var/www/.subversion/servers" the following lines:

[global] store-plaintext-passwords=yes