Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Fatal error: Call to undefined method stdClass::Table()

Hi There,

I'm experiencing an issue when I attempt to set up vanilla forums with my wordpress blog.
After I go through the initial setup window I get the following:

Fatal error: Call to undefined method stdClass::Table() in /var/www/forums/applications/dashboard/settings/structure.php on line 22

I have tested out the same setup on my local instance of the site using the same php version (5.3.14) and all works fine so I'm at a bit of a loss to explain where this is tripping up


  • LincLinc Detroit Admin

    What version of Vanilla?

    Are Vanilla and WordPress in separate folders?

  • Latest version of vanilla (
    Wordpress is located in the root folder and vanilla is in its own folder (/forums/)

  • LincLinc Detroit Admin

    I'd manually verify all the files were copied properly to your server.

    It's not defining $Construct correctly, which gets defined just above it in the same file thusly:

    $Database = Gdn::Database(); $SQL = $Database->SQL(); $Construct = $Database->Structure();

    If that's failing, you're probably either missing files or it's not running the version of PHP you think it is.

  • I've just done a fresh install and checked my php version using phpinfo() (v. 5.3.8)

    Still failing with the same error

  • peregrineperegrine MVP
    edited December 2012

    Don't know if this is related. what are your settings for PDO? and SQL

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Through phpinfo:

    PDO Drivers: sqlite, sqlite2, mysql
    pdo_mysql, Client API version: 5.1.41

  • LincLinc Detroit Admin

    After '$Database = Gdn::Database();' add 'var_dump($Database);' and tell us what it prints.

  • I have removed db username and password:

    object(Gdn_Database)#21 (14) { ["ClassName"]=> string(12) "Gdn_Database" ["_CurrentResultSet":"Gdn_Database":private]=> NULL ["_Connection":protected]=> NULL ["_SQL":protected]=> object(stdClass)#29 (1) { ["Database"]=> *RECURSION* } ["_Structure":protected]=> object(stdClass)#30 (1) { ["Database"]=> *RECURSION* } ["_IsPersistent":protected]=> bool(false) ["ConnectionOptions"]=> NULL ["DatabasePrefix"]=> NULL ["ExtendedProperties"]=> array(0) { } ["_InTransaction":protected]=> bool(false) ["Dsn"]=> string(49) ";port=3306;dbname=sadie;" ["Engine"]=> NULL ["Password"]=> string(8) "PASSWORD" ["User"]=> string(7) "USERNAME" }

    Any ideas?

  • A wild guess.

    I think this may be causing the problem;port=3306

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Hmm,

    I'm using a pagodabox instance to run the forum and this is how they provide access to the db. Works fine in wordpress, I'll have to look in to an alternative option.

  • LincLinc Detroit Admin

    Coincidentally, there's only 1 Pull Request pending on the project I haven't gotten to yet and this is what it fixes:

    Try doing that change manually.

  • A little late here, @melbouy but the solution for your issue is:

    SSH/SFTP into your shared/conf/ folder on Pagodabox, and add the other stuff from the conf folder (config-defaults.php, locales.php, constants.php), don't upload a new conf.php, the install script generates that.

    You must do this both if you push up a git repo, or use the quickstart from the Pagoda control panel when creating a new app.


Sign In or Register to comment.