Hello all,

Recently I upgraded a box running phpwiki from php 5.2.8 to 5.2.9. After the upgrade, phpwiki (1.3.14) started spitting out the following two errors, both of which are basically leaving the wiki dead in the water:

[30-Mar-2009 22:01:23] PHP Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in /usr/local/www/data/wikisvn/lib/config.php(500) : eval()'d code on line 2 [30-Mar-2009 22:01:23] PHP Fatal error: Class 'WikiDB_backend_PearDB_PearDB' not found in /usr/local/www/data/wikisvn/lib/WikiDB/SQL.php on line 25

Looking at the changelog, I'm simply not seeing anything that would cause this.

Snippets of both files are below. Looking for any pointers - I need to get the wiki up and running again and phpwiki releases are few and far between.

Thanks,

Charles

first error is in this block:

/**
 * safe php4 definition for clone.
 * php5 copies objects by reference, but we need to clone "deep copy" in
   some places.
 * (BlockParser)
 * We need to eval it as workaround for the php5 parser.
 * See http://www.acko.net/node/54
 */
if (!check_php_version(5)) {
    eval('
    function clone($object) {
      return $object;
    }
    ');
}

And the second error is in here:

 function WikiDB_SQL ($dbparams) {
        $backend = 'PearDB';
        if (is_array($dbparams['dsn']))
            $backend = $dbparams['dsn']['phptype'];
        elseif (preg_match('/^(\w+):/', $dbparams['dsn'], $m))
            $backend = $m[1];
if ($backend == 'postgres7') { // ADODB cross-compatiblity hack (for uni
t testing)
            $backend = 'pgsql';
            if (is_string($dbparams['dsn']))
$dbparams['dsn'] = $backend . ':' . substr($dbparams['dsn'], 10)
;
        }
        include_once ("lib/WikiDB/backend/PearDB_".$backend.".php");
        $backend_class = "WikiDB_backend_PearDB_".$backend;
        $backend = & new $backend_class($dbparams);
        if (DB::isError($backend->_dbh)) return;
        $this->WikiDB($backend, $dbparams);
    }

The variable "$backend" is getting futzed up somewhere...

Not much to go on, I know...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to