Menu

Problem in main.php

Help
2003-04-09
2012-10-11
  • Mike Hedman

    Mike Hedman - 2003-04-09

    When I first run the wiki I get the following error:
    Fatal error: Call to a member function on a non-object in /var/www/html/phpwiki/lib/main.php on line 162

    I'm running:
    Redhat 8.0:
    Apache 2.0
    mySQL 3.23..52
    php 4.2.2     (installed the php-mysql-4.2.2-8.0.5.i386.rpm)

    I believe that I've set up the database correctly, and the db settings in index.php.

    The error is being raised in the WikiRequest->getPage function.  It appears that the problem is that _dbi is not an object.  One odd thing is that in the beginning of the function it checks if isset($this->_dbi), which indicates that it is indeed set - but it's not an object.

    Another odd thing is that I'm not really sure whose member variable _dbi is.  At the top of the WikiRequest class is a commented out declaration:
        // var $_dbi;
    which I interpret as _dbi is not a member var of WikiRequest, nor is it declared in the parent class Request.

    There is a cryptic note in getDbh() (in main.php):
    // needs PHP 4.1. better use $this->_user->...

    WikiRequest does have a member var of _user of type WikiUser which does indeed have a member var of _dbi.

    I'm hoping someone can shine some light on this for me (and the couple of other people who seem to be having this same problem).

    Thanks,
    Mike

     
    • Anonymous

      Anonymous - 2003-04-25

      Today I've tryed to install phpwiki on our Companys Win2000/mySQL/Apache2/PHP-4.3.1 box  but all I get is:

      Fatal error: Call to a member function on a non-object in C:\home\www\htdocs\heaven\wiki\lib\main.php on line 162

      Fatal error: Call to a member function on a non-object in C:\home\www\htdocs\heaven\wiki\lib\ErrorManager.php on line 261

      Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

      At home phpwiki runs on a Debian box without any problems.

       
    • Peter McNeil

      Peter McNeil - 2003-05-12

      We get exactly the same problem on RH9.0 with postgresql DB. error is "Fatal error: Call to a member function on a non-object in /var/www/html/phpwiki/lib/main.php on line 162"

      Had a look at the code and came to the same conclusions/questions as Mike

      Trying to start as a flatfile I get these errors, dunno if it is related.

      lib/DbaDatabase.php:32: Fatal[256]: driver initialization failed

      lib/config.php:276: Notice[8]: Undefined variable: SCRIPT_NAME

      lib/config.php:401: Notice[8]: Undefined index: dsn

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.