• Visit Rebornbuddy
  • [BuddyCon] Self Hosting

    Discussion in 'Monitoring' started by thalord, Oct 20, 2012.

    1. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      Same as BuddyCon but with own Hosting support

      TODO: write more infos here ^^

      Git: https://github.com/buddycon/BuddyCon-Server


      A very nice PDF with installation instructions was written by crypt3x. Thanks for that ;):

      To add Server:
      The Plugin already sent that (you use BuddyCon1?). you need to add a server column to the bot table. And then in the ApiController.php add
      ApiController::$dataArr['server'] =$_POST['server'];
      after line 82

      And change that:
      PHP:
                      $sql 'SELECT id,do,wantscreen FROM bot WHERE user_id = :user AND name = :name';
                      
      $command=$connection->createCommand($sql);
                      
      $command->bindValue(":user",$user_id);
                      
      $command->bindValue(":name",$_POST['name']);
      to that:
      PHP:
                      $sql 'SELECT id,do,wantscreen FROM bot WHERE user_id = :user AND name = :name AND server = :server';
                      
      $command=$connection->createCommand($sql);
                      
      $command->bindValue(":user",$user_id);
                      
      $command->bindValue(":name",$_POST['name']);
                      
      $command->bindValue(":server",$_POST['server']);
      warning: After that the old bots will not be updated (if you doenst add the server to every bot in the bot table manually)

      Then at /views/bot/index.php
      Add:
      array('name'=>'server', 'header'=>'Server'),
      after line 34.
      That should do it!
       

      Attached Files:

      Last edited: Jan 27, 2013
      soulravager likes this.
    2. s_catcher

      s_catcher New Member

      Joined:
      Jul 5, 2012
      Messages:
      518
      Likes Received:
      6
      Trophy Points:
      0
      i still will marrie you :) (u know what mean ;))
      Very very nice, i'll try it tomorrow :)
       
    3. Anteac

      Anteac New Member

      Joined:
      Sep 9, 2011
      Messages:
      70
      Likes Received:
      3
      Trophy Points:
      0
      Getting this error, did everything correct via the manual.


      Code:
       The table "user" for active record class "User" cannot be found in the database.
      
      /home/sites/site744/web/hb/buddycon/yii/framework/yiilite.php(7786)
      
      7774 class CActiveRecordMetaData
      7775 {
      7776     public $tableSchema;
      7777     public $columns;
      7778     public $relations=array();
      7779     public $attributeDefaults=array();
      7780     private $_model;
      7781     public function __construct($model)
      7782     {
      7783         $this->_model=$model;
      7784         $tableName=$model->tableName();
      7785         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
      7786             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
      7787                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
      7788         if($table->primaryKey===null)
      7789         {
      7790             $table->primaryKey=$model->primaryKey();
      7791             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
      7792                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
      7793             else if(is_array($table->primaryKey))
      7794             {
      7795                 foreach($table->primaryKey as $name)
      7796                 {
      7797                     if(isset($table->columns[$name]))
      7798                         $table->columns[$name]->isPrimaryKey=true;
      
      
       
    4. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      But you putted buddy.sql in your db?
       
    5. Anteac

      Anteac New Member

      Joined:
      Sep 9, 2011
      Messages:
      70
      Likes Received:
      3
      Trophy Points:
      0
      Yeah, got all tables in there.
       
    6. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      Something must be wrong with your data in the protected/config/main.php. Maybe wrong database name?
       
    7. Anteac

      Anteac New Member

      Joined:
      Sep 9, 2011
      Messages:
      70
      Likes Received:
      3
      Trophy Points:
      0
      i created 2 already, both didn't work.

      could you maybe upload a main.php with the db name buddycon, maybe i put it in the wrong position
       
    8. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      'db'=>array(
      'connectionString' => 'mysql:host=localhost;dbname=database',
      'emulatePrepare' => true,
      'username' => 'user',
      'password' => 'pass',
      'charset' => 'utf8',
      ),

      RED: Database name

      so for a server where the db name is buddycon it would be
      'connectionString' => 'mysql:host=localhost;dbname=buddycon',
       
    9. Anteac

      Anteac New Member

      Joined:
      Sep 9, 2011
      Messages:
      70
      Likes Received:
      3
      Trophy Points:
      0
      I have the site located on a subdomain of the real site.
      'connectionString' => 'mysql:host=localhost;dbname=buddycon', Does that need to be different then?
       
    10. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      normally not. localhost is the ip of the server. And it seems that not the connectiong is the problem its just a db where is no table user ...
       
    11. Anteac

      Anteac New Member

      Joined:
      Sep 9, 2011
      Messages:
      70
      Likes Received:
      3
      Trophy Points:
      0
      Nevermind, got it working now.

      I used capital letters in my db password, after i changed that it worked perfectly.

      thanks
       
    12. Gandalf

      Gandalf Member

      Joined:
      Jun 8, 2011
      Messages:
      396
      Likes Received:
      3
      Trophy Points:
      18
      Any clues if i can setup this on a free webhost? Someone knows one or have i to buy webspace?
       
    13. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      Mh dont know but you only need PHP5 and MySql ... not really high requirments.
      Google whispers me: FREE Web Hosting Providers
      I recommend the words "PHP5 free webhost" if theres nothing ;)
       
    14. Mirabis

      Mirabis Community Developer

      Joined:
      Jun 14, 2010
      Messages:
      4,475
      Likes Received:
      86
      Trophy Points:
      48
      Meh, installed fine etc... but upon login it says
      Incorrect username or password hmm
       
    15. randomstraw

      randomstraw Community Developer

      Joined:
      Jul 17, 2012
      Messages:
      1,611
      Likes Received:
      10
      Trophy Points:
      38
      i'd like to buy a beer if its working.
       
    16. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      You created a new user @ index.ph?r=user/create?
      If you have i have too look at it ... mybe sent me your url per pm
       
    17. Mirabis

      Mirabis Community Developer

      Joined:
      Jun 14, 2010
      Messages:
      4,475
      Likes Received:
      86
      Trophy Points:
      48
      Crap, that fixed it...

      I tried logging in with my buddycon.eu acc but had to make a new one since db is on my server =]

      Ty for ur fast response.
       
    18. cm2003

      cm2003 New Member

      Joined:
      Jul 16, 2011
      Messages:
      260
      Likes Received:
      1
      Trophy Points:
      0
      Parse error: syntax error, unexpected T_FUNCTION in **/BuddyCon/protected/views/bot/index.php on line 21

      User creation was working fine. Also created the api key, but the bot index isn't working :(
       
    19. thalord

      thalord Community Developer

      Joined:
      Apr 24, 2011
      Messages:
      651
      Likes Received:
      11
      Trophy Points:
      0
      Could you post the line? Im on a different version
       
    20. randomstraw

      randomstraw Community Developer

      Joined:
      Jul 17, 2012
      Messages:
      1,611
      Likes Received:
      10
      Trophy Points:
      38
      - 3079220 -

      edit: 2 bots, 4 failures (4 entries)
      Error?! Please post this to the author: 11 - 16308 -
      Error?! Please post this to the author: 9 - 3079408 -
      Error?! Please post this to the author: 12 - 16308 -
      Error?! Please post this to the author: 10 - 3079408 -


      seems to be a plugin issue. the plugin "disables" itself in the HB gui, but is still enabled. so you cannot disable it.
       
      Last edited: Oct 23, 2012

    Share This Page