Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Installed OK, error on login Call to a member function on a non-object

edited September 2005 in Vanilla 1.0 Help
Went through install.php no problem (very nicely done, btw). Once I took up the installer's invite to sign in, I received the following error: Fatal error: Call to a member function on a non-object in /hsphere/local/home/pixif/forum.pixiful.com/index.php on line 24 Feeling clever, I commented out line 24, and received error identical exc. now on line 27. Poked around a bit more, signed up for forum, read all pertinent posts in this section, and then promptly cried for help (this posting). A little info. Host: FreeBSD bsd18.infinology.net 4.9-RELEASE FreeBSD 4.9-RELEASE #2: Wed Aug i386 Version Info: Apache/1.3.33 (Unix) PHP/4.3.10 phpinfo: http://pixiful.com/phpinfo.php Yon forum attempted: http://forum.pixiful.com/ And the possibly pertinent section of my settings.php sans password. ... // Database Settings define("dbHOST", "mysql3.infinology.net"); define("dbNAME", "pixif_vanilla"); define("dbUSER", "pixif_vanilla"); define("dbPASSWORD", "xxx"); // Path Settings define("agAPPLICATION_PATH", "/hsphere/local/home/pixif/forum.pixiful.com/"); define("sgLIBRARY", agAPPLICATION_PATH."library/"); define("agEXTENSIONS", agAPPLICATION_PATH."extensions/"); define("agLANGUAGES", agAPPLICATION_PATH."languages/"); ... Thanks, I haven't messed with website authoring since '99, but look what's happened since I've been away. CSS, MySQL, XML, standards, and people like you. Really very nice. Thanks. Emerson tells us, "There is a crack in everything God has made..." Now, just whom has handed me this trowel? Andrus Cummings Lanikai Studios, Maui andrus@pixiful.com 808-572-0669 also: Steve Cummings Akaku: Maui Community Television steve@akaku.org 808-871-5554

Comments

  • I'm almost certain i've seen pretty much the same problem posted here in the past but since i've read all 700+ discussions on the board i've lost track of when and where it was. And searching isnt helping. Bugger.
  • okay, I'll do some archive mining and see what I can dig up. Thanks, minisweeper.
  • Hmm, Searched on the word "non-object" and got a post from Mr. Mark indicating that my db connections must be funky. ----------------------------------------------- mark Jun 22nd 2005 edited Jonezy - Looks like your database connection values are wrong. I was able to duplicate that error by entering a bogus dbHOST, dbNAME, duUSER and dbPASSWORD values. ----------------------------------------------- Topic was: Beta Testing: Multi-Language & Pre-Release Vanilla Thanks.
  • Hmm, Checked mySQL databases, login works. Lussumo databases are there and populated with my admin account. Added the port (3306) to the dbhost value to send *mysql3.infinology.net:3306* Prior to this, signin.php had failed with an *unable to connect to DB* error. If I navigate to http://forum.pixiful.com/signin.php, I can sign in, I see my Pixiful Place banner, and am presented with the choice of going to discussions or categories. Clicking on the discussions link gives me the non-object error on line 24, clicking on categories give the non-object error on line 20 of index.php. Hmm,
  • Oops, discussions link errors on line 24 of index.php, categories gives the error on line 20 of categories.php. But, you knew that...
  • MarkMark Vanilla Staff
    edited September 2005
    Well, line 24 of index.php is:

    $Context->Session->Check(agSAFE_REDIRECT);

    So, that error means that either the context object or the session object doesn't exist even though it should.

    To figure out what's wrong, you need to find out why those objects aren't being instantiated. The context object is easy. It is instantiated on line 40 of appg/init_external.php:

    $Context = new Context();

    Why don't you try echoing something right before that line to make sure that the line is being parsed by php. Move line 40 down to line 41, and echo something on line 40.... something like this:

    echo("Hello?"); $Context = new Context();

    Then take a look at your index file again and see if it says "Hello?" before throwing the error.

    If it doesn't say that, then you know the problem is with your include paths, because the init_external.php file isn't being included properly.
  • hah. i was going to suggest echoing something somewhere to check the includes, but i had no idea where and i was too tired to work it out. Oh well, i suppose i'm half way there!
  • Thanks for the echo suggestion. Put that in and fiddled path issues, wish I didn't have a shared IP at my host. Finally dropped the tables and ran installer.php again, this time adding the port number in the host id rather than simply adding it into the settings.php file. (mysql3.infinology.net:3306 rather than just mysql3.infinology.net. Eureka echo text! Also, regrettably two new errors. I must need to flush something else out some where. I think to read the documentation at this point would save you from further idiocy/ignorance on my part. Errors follow. Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/pixif/forum.pixiful.com/appg/init_external.php:40) in /hsphere/local/home/pixif/forum.pixiful.com/library/Vanilla.Session.class.php on line 63 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/pixif/forum.pixiful.com/appg/init_external.php:40) in /hsphere/local/home/pixif/forum.pixiful.com/controls/signin.php on line 58
  • Gee, Deleted everything, reinstalled files, invoked installer.php with the port number in the dbHOST id and everything works just fine. Ahem. I would precede my future posts with some sort of disclaimer, but minisweeper already has that one knocked. I'll just go and pester my dogs for a bit with some cloudy ale. Thanks for Vanilla.
  • haha. interesting. Really just reinstalling everything isnt the best way of getting rid of errors from a support point of view but as an end user in many cases it can be much easier and if it gets the job done with no harm then its probably the best option. Enjoy!
  • MarkMark Vanilla Staff
    I'd say that the new error was caused by the echo text. If you had just deleted it everything would have worked. The original problem causing the first error must have been your incorrect port number. But yeah - enjoy :)
  • p.s. might be worth adding the port number thing to the wiki?
  • I agree. Better to figure out what's wrong rather than just being a brute. I do believe, however, that with this hosting setup the port number is a requisite for the dbHOST. I had joy with signin.php, but then ran into errors with index.php just trying to get past lines 15, 16 and so on. That and the nagging doubts caused by "header already sent" led me to the dumpster. At least, now I feel clean again.
This discussion has been closed.