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.
Options

Error after fresh 1.4 installation: Warning: Undefined property: Connection...

edited December 2007 in Vanilla 1.0 Help
Hi there, I got a problem installing the 1.4er Version. Hava a look at http://forum.i-tn.de That's the Error Message: Warning: Undefined property: Connection in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.MySQL.php on line 65 Warning: Undefined property: User in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.SqlBuilder.php on line 321 Warning: Undefined property: Scripts in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Control.Head.php on line 34 Warning: Undefined property: StyleSheets in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Control.Head.php on line 43 Warning: Undefined property: Strings in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/themes/head.php on line 30 PHP works as CGI, MySQL is 5.0.45, the Host is Strato: www.strato.de Has anybody an idea what went wrong? I've already made the following changes: http://lussumo.com/community/discussion/7434/ but still the same. Thanks for any help, Tom

Comments

  • Options
    Try replacing Framework.Control.Head.php with this:<?php class Head extends Control { var $Scripts; // Script collection var $StyleSheets; // Stylesheet collection var $Strings; // String collection var $BodyId; // identifier assigned to the body tag var $Meta; // An associative array of meta tags/content to be added to the head. function AddScript($ScriptLocation, $ScriptRoot = '~') { if ($ScriptRoot == '~') $ScriptRoot = $this->Context->Configuration['WEB_ROOT']; $ScriptPath = $ScriptLocation; if ($ScriptRoot != '') $ScriptPath = ConcatenatePath($ScriptRoot, $ScriptLocation); if (!in_array($ScriptPath, $this->Scripts)) $this->Scripts[] = $ScriptPath; } function AddStyleSheet($StyleSheetLocation, $Media = '', $Position = '100', $StyleRoot = '~') { if ($StyleRoot == '~') $StyleRoot = $this->Context->Configuration['WEB_ROOT']; $StylePath = $StyleSheetLocation; if ($StylePath != '') $StylePath = ConcatenatePath($StyleRoot, $StyleSheetLocation); $this->InsertItemAt($this->StyleSheets, array('Sheet' => $StylePath, 'Media' => $Media), $Position); } function AddString($String) { $this->Strings[] = $String; } function Clear() { $this->ClearStrings(); $this->ClearStyleSheets(); $this->ClearScripts(); $this->Meta = array(); } function ClearStrings() { $this->Strings = array(); } function ClearStyleSheets() { $this->StyleSheets = array(); } function ClearScripts() { $this->Scripts = array(); } function Head(&$Context) { $this->Name = 'Head'; $this->BodyId = ''; $this->Control($Context); $this->Clear(); } function Render() { // First sort the stylesheets by key ksort($this->StyleSheets); $this->CallDelegate('PreRender'); include(ThemeFilePath($this->Context->Configuration, 'head.php')); $this->CallDelegate('PostRender'); } } ?>I'm looking into some of the other messages...
  • Options
    edited December 2007
    OK, edit the Framework.Class.Database.php file, and change the database function to this: function Database(&$Context) { $this->Name = 'Database'; $this->Connection = 0; $Context->ErrorManager->AddError($Context, $this->Name, 'Constructor', 'You can not generate a database object with the database interface. You must use an implementation of the interface like the MySQL implementation.'); }

    Please let me know if these changes work, or if you have additional problems, they probably only appeared for you because your PHP install is configured to be a little more strict about error reporting.

    Edit:
    Other messages that I noticed on the sign-in screen can be fixed by editing People.Class.User and adding at the bottom one line so it looks like this: function User(&$Context) { $this->Context = &$Context; $this->Clear(); }

    And for some additional messages on the search page when performing a search, add this function to Vanilla.Class.Search.php: function Search() { $this->clear(); }
  • Options
    Hi WallPhone, ok, I made the changes and it looked better on the sign-in page. Just a short Error Message at the bottom. After logging in, the layout ist totaly missing, seems like no css is loaded. And there are plenty of other error messages that appear. I've made an account for your (UN and PW is your UN in here) so that you can check the numerous mistakes. But actually, I don't know wheter you got the invitation, cause after filling the form, it looked like this: Warning: Undefined property: Connection in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.MySQL.php on line 65 Warning: Undefined property: User in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.SqlBuilder.php on line 321 Warning: Undefined property: isValid in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.Validator.php on line 114 Warning: Undefined property: ValidationExpression in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.Validator.php on line 92 Warning: Undefined property: isValid in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.Validator.php on line 114 Warning: Undefined property: ValidationExpression in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.Validator.php on line 92 Warning: Undefined property: isValid in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.Validator.php on line 114 Warning: Undefined property: FarmConnection in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.MySQL.php on line 83 Warning: Undefined property: FarmConnection in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.MySQL.php on line 83 Warning: Undefined property: FarmConnection in /mnt/web1/42/12/5559612/htdocs/i-tn/forum/library/Framework/Framework.Class.MySQL.php on line 83 Thanks for your help so far. Tom
  • Options
    PS: The Link was http://forum.i-tn.de
  • Options
    It looks like the account was created, but wasn't complete--it doesn't seem to have permission to sign in. You might have to go into the settings and approve the account for membership.

    Lets try making Framework.Class.MySql.php's MySql function look like this: function MySql(&$Context) { $this->Name = 'MySQL'; $this->Context = &$Context; $this->Conection = 0; $this->FarmConnection = 0; }

    And again, add a clear line to Framework.Class.Validator.php: function Validator(&$Context) { $this->Context = &$Context; $this->Clear(); }

    Glad to help!
  • Options
    It appears that you may be able to clear all these messages out by adding this line inside conf/settings.php:error_reporting(7);
    It might not work however, as I have been fiddling with the error reporting trying to get it to show the same messages on my test server, but it's not working for me.
  • Options
    :-) Post 6: I've done that now, and the error messages getting rare. Post 7: I haven't included this line of code so far, cause appliciation doesn't work properly so far. So, oen can still see the error messages to see waht's going wrong. There's still no CSS after logging in... Would it be easier to give you FTP-access for a sandbox environment on my server? So far, Tom
  • Options
    FTP: Yah that would be helpful.

    I see the CSS fine, even when logged in. So it might just be a bad style in the database for your account. Go to settings, themes & styles, then click save.
  • Options
    > Go to settings, themes & styles, then click save. Bingo! FTP-Data has been sent to your Mail adress.
  • Options
    The errors in delegation and the database would not clear without adding additional check functions, and fixing the messages for the search actually stopped search from working... so I added some code to conf/settings.php to turn off error reporting for these last few messages.

    I also had to remove a line from conf/extensions.php, since ForcedBBCode was removed from the server before it was turned off.

    You should be good to go, if there are other issues that crop up, you can turn the error reporting back on by editing conf/settings.php and commenting out the line that sets an error handler.
  • Options
    Hey, that looks pretty cool now. Thanks for your help. ForcedBBCode had to be deleted from the server as I had a whitescreen with some error messages after installing and couldn't turn it of again. I didn't know there where additional code in the settings, thanks. I hope, that the learnings are transferable as general learning so that the software might getting better in that point with the next update... So far, Tom
This discussion has been closed.