[pmwiki-users] Why doesn't this installation sequence work?

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Mon Mar 20 18:08:57 CST 2006


First I tried a sequence of commands to test a way to install a farm which
didn't work at all (I just got a blank screen when browsing).  Then Hagan
suggested a slightly different sequence of commands, which resulted in a
different error. Below is yet another slightly modified sequence and the
result that I think I may have found a bug or design problem with
skin.php.

  cd
  svn checkout svn://pmwiki.org/pmwiki/tags/latest pmwiki
  mv pmwiki/pub public_html/farmpub
  echo "<?php \$FarmPubDirUrl='/~$USER/farmpub';" >pmwiki/local/farmconfig.php
  mkdir -p public_html/test
  echo '<?php include("../../pmwiki/pmwiki.php");'>public_html/test/index.php

and the error message when browsing is as follows

    PmWiki can't process your request

    ?unable to find skin from list pmwiki

    We are sorry for any inconvenience.

This is the same error message Hagan got so it's confirmed. I looked into 
it, and the problem seems to be in skin.php. I've attached a patch at 
the end of this post which gives a slightly more verbose message:

	?unable to find skin from list pmwiki because the directory 
	/home/chr/pmwiki/pub/skins/pmwiki doesn't exist!

So the problem is that skin.php looks in the wrong place for the skin.  
AFAICT, the error occurs because pub/ isn't located in $FarmD, but I 
didn't think $FarmD had to point there, just to where cookbook/ and 
scripts/ is located?

Do we need a new variable called something like $FarmPubD?

regards
/Christian

Index: scripts/skins.php
===================================================================
--- scripts/skins.php	(revision 1402)
+++ scripts/skins.php	(arbetskopia)
@@ -51,7 +51,8 @@

   foreach((array)$skin as $s) {
     $sd = FmtPageName("./pub/skins/$s", $pagename);
     if (is_dir($sd))
       { $Skin=$s; $SkinDirUrl="$PubDirUrl/skins/$Skin"; break; }
     $sd = FmtPageName("$FarmD/pub/skins/$s", $pagename);
     if (is_dir($sd))
       { $Skin=$s; $SkinDirUrl="$FarmPubDirUrl/skins/$Skin"; break; }
   }

   if (!is_dir($sd)) 
-    Abort("?unable to find skin from list ".implode(' ',(array)$skin));
+    Abort("?unable to find skin from list ".implode(' ',(array)$skin)
+	  ." because the directory $sd doesn't exist!");
   $SkinDir = $sd;
   $IsTemplateLoaded = 0;
   if (file_exists("$SkinDir/$Skin.php"))

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list