[pmwiki-users] Fwd: Editing Pmwiki *Locally* in a *Text Editor*

Petko Yotov 5ko at 5ko.fr
Thu Apr 9 09:19:32 CDT 2009


On Thursday 09 April 2009 16:02:23 Sameer Kumar wrote:
> if ($_SERVER['SERVER_ADDR'] == "127.0.0.1"){
>  $ScriptUrl = 'http://localhost/';
>  $PubDirUrl = 'http://localhost/pub';
> # $EnablePathInfo=0;
> }
> else {
> $ScriptUrl = 'http://wiki.kumarsingh.com';
> $PubDirUrl = 'http://wiki.kumarsingh.com/pub';
> }
>
> However, once loaded, all links resolve to literally:
> http://localhost***/Group/Page ! (including the three asterixes).
> Looking at the source of this page, I could see the following:
>
>  <link rel='stylesheet'
> href='http://localhost***/skins/cpmwiki/cpmwiki.css' type='text/css' />
>   <script type="text/javascript" src="http://localhost
> ***/skins/cpmwiki/sorttable.js"></script>

You could just leave PmWiki find its files and directories onyour local 
installation:

if ($_SERVER['SERVER_ADDR'] != "127.0.0.1") # only NOT at home
{
   $ScriptUrl = 'http://wiki.kumarsingh.com';
   $PubDirUrl = 'http://wiki.kumarsingh.com/pub';
   $EnablePathInfo=1; 
}

Also, be sure to remove or comment-out other lines starting with $ScriptUrl=, 
$PubDirUrl=, or $EnablePathInfo=, that may be in config.php.

Then you access your local wiki via http://localhost/pmwiki.php .

Thanks,
Petko




More information about the pmwiki-users mailing list