[pmwiki-users] config.php problem, not recognizing include? - Testlog

Patrick Ogay lists at basel-inside.ch
Fri Feb 11 06:34:36 CST 2005


 >I have tried this with several other addons all with the same no 
result.  I know I am missing something basic here, any ideas?
* Are the addons called at all? 
** You could use "require"  so that php gives a message, when include is 
not available
** include_once("$FarmD/local/addon.php");  
     to be shure, to call the includes for main path (were pmwiki is 
phyically) you can use  $FarmD/
*sometimes, if an error happens in a addon, it seems, it does nothing

* If you made an upgrate for 1.x to 2.x you have probably upgrade the 
addons .

First I would find out, whether the addons are called at all. 
I havn't found a log feature in pmwiki.
I always use  my
TestLog("Addon xyz  called" ) ;  /* see below */

I place the function in config.php or farmconfig.php
The log I can check from my wikipage, it's quite praktical for testing.

regards
Patrick Ogay

---

#### T e s t l o g
####  enabled  if  $TestLogFile is not empty
####    
$TestLogFile = "$FarmD/user.d/pm.log";   /* enable log , "user.d"  I 
created, because
                                                                     
"wiki.d" should not be accessible by a browser */
function TestLog($output) {
     global $FarmD,$TestLogFile;    /* if global Variable $TestLogFile 
is on, it's the filename */
     if ($TestLogFile) {                    
    #$path = realpath("./"); --  working Dir
     if ($txtfp = fopen($TestLogFile,"a")) {
       fputs($txtfp,"$output \n");
       fclose($txtfp);
       }
     else
      Abort("Unable to open TestLog: $TestLogFile ");
     }
}





More information about the pmwiki-users mailing list