JABirchall / NimdaTS3

An Advanced Teamspeak 3 Bot with a nice plugin autoloading
GNU Affero General Public License v3.0
28 stars 6 forks source link

Issue when executing start.php #5

Closed ygtripps closed 8 years ago

ygtripps commented 8 years ago
antsbot@caveman-gaming:~/tsbot$ php composer.phar dump-autoload
Generating autoload files
antsbot@caveman-gaming:~/tsbot$ php start.php
PHP Fatal error:  Class 'Config\TeamSpeak' not found in /home/antsbot/tsbot/start.php on line 7
antsbot@caveman-gaming:~/tsbot$ php -v
PHP 5.5.9-1ubuntu4.19 (cli) (built: Jul 28 2016 19:31:33)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
JABirchall commented 8 years ago

The minimum required php version is 5.6 as told in the readme: https://github.com/JABirchall/NimdaTS3/blob/master/README.md

ygtripps commented 8 years ago

I just updated my version and I still get the same issue:

antsbot@caveman-gaming:~/tsbot$ php composer.phar dump-autoload Generating autoload files antsbot@caveman-gaming:~/tsbot$ php start.php PHP Fatal error: Class 'Config\TeamSpeak' not found in /home/antsbot/tsbot/start.php on line 7 antsbot@caveman-gaming:~/tsbot$ php -v PHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 (cli) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

JABirchall commented 8 years ago

Will look into it.

JABirchall commented 8 years ago

update, try the patch i just pushed

ygtripps commented 8 years ago

Well that fixed that issue with it showing that error, but now I receive this issue:

antsbot@caveman-gaming:~/tsbot$ php start.php PHP Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 139 [03:49:00]: [WARNING] Running Nimda logged in as serveradmin is bad! [03:49:00]: Start anyway? Y/N: y PHP Fatal error: Class 'Plugin\Models\Plugin' not found in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 300 antsbot@caveman-gaming:~/tsbot$

JABirchall commented 8 years ago

Ok im on track with what the issue is, I have now fixxed that error.

Since i dont have a linux dev environment there are some class autoloading case problems.

anyway try the latests patch

ygtripps commented 8 years ago

Different issue now:

antsbot@caveman-gaming:~/tsbot$ php start.php [17:22:43]: [WARNING] Running Nimda logged in as serveradmin is bad! [17:22:43]: Start anyway? Y/N: y PHP Notice: Trying to get property of non-object in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 306 PHP Notice: Trying to get property of non-object in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 307 PHP Fatal error: Call to a member function update() on null in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 309

JABirchall commented 8 years ago

Ok try latest patch

ygtripps commented 8 years ago
antsbot@caveman-gaming:~/tsbot$ php start.php
PHP Parse error:  syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 304
JABirchall commented 8 years ago

ok try latest

ygtripps commented 8 years ago

antsbot@caveman-gaming:~/tsbot$ php start.php [18:46:20]: [WARNING] Running Nimda logged in as serveradmin is bad! [18:46:20]: Start anyway? Y/N: y PHP Notice: Trying to get property of non-object in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 304 PHP Notice: Trying to get property of non-object in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 305 PHP Fatal error: Call to a member function update() on null in /home/antsbot/tsbot/app/TeamSpeak3Bot.php on line 307

JABirchall commented 8 years ago

I think you'll need to delete the Nimda database.sqlite and recreate it.

just run rm database.sqlite;touch database.sqlite because the code its breaking on is checking if the database is setup or if the database needs updating. its getting no object from the database because the database is setup but contains no data (related to nimda). Plugin::where('name', 'Nimda')->first();

ygtripps commented 8 years ago

Well when I try to run it with sqlite I get this:

PHP Fatal error:  Uncaught exception 'PDOException' with message 'could not find driver' in /home/antsbot/tsbot/vendor/illuminate/database/Connectors/Connector.php:55
Stack trace:
#0 /home/antsbot/tsbot/vendor/illuminate/database/Connectors/Connector.php(55): PDO->__construct('sqlite:/home/an...', NULL, NULL, Array)
#1 /home/antsbot/tsbot/vendor/illuminate/database/Connectors/SQLiteConnector.php(37): Illuminate\Database\Connectors\Connector->createConnection('sqlite:/home/an...', Array, Array)
#2 /home/antsbot/tsbot/vendor/illuminate/database/Connectors/ConnectionFactory.php(61): Illuminate\Database\Connectors\SQLiteConnector->connect(Array)
#3 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
#4 /home/antsbot/tsbot/vendor/illuminate/database/Connection.php(875): call_user_func(Object(Closure))
#5 /home/antsbot/tsbot/vendor/illuminate/database/Connection.php(743): Illuminate\Database\Connection->getPdo()
#6 /home/antsbot/tsbot/vendor/illuminate/database/Connection in /home/antsbot/tsbot/vendor/illuminate/database/Connectors/Connector.php on line 55
ygtripps commented 8 years ago

My fault was missing php5-sqlite, though I don't know if this is how it is supposed to look when starting up:

antsbot@caveman-gaming:~/tsbot$ php start.php
[19:24:20]: [WARNING] Running Nimda logged in as serveradmin is bad!
[19:24:20]: Start anyway? Y/N: y
[19:24:21]: Loading plugin [BadChannelName] by JABirchall                       :: Success.
[19:24:21]: Loading plugin [BadClass] by JABirchall                             :: Loading failed because class Plugin\BadClass doesn't exist.
[19:24:21]: Loading plugin [ChannelGroupNotifications] by JABirchall            :: Success.
[19:24:21]: Loading plugin [ClientInfo] by JABirchall                           :: Success.
[19:24:21]: Loading plugin [Jail] by JABirchall                                 :: Success.
[19:24:21]: Loading plugin [Kick] by JABirchall                                 :: Success.
[19:24:21]: Loading plugin [MD5] by JABirchall                                  :: Success.
[19:24:21]: Loading plugin [NoInterface] by JABirchall                          :: Loading failed because class Plugin\NoInterface does not impleme                                                                                                                                                    nt [PluginContract].
[19:24:21]: Loading plugin [Quotes] by JABirchall                               :: Install, Success.
[19:24:21]: Loading plugin [Seen] by JABirchall                                 :: Success.
[19:24:21]: Loading plugin [WelcomeMsg] by MAJID                                :: Success.
[19:24:21]: Nimda version 0.10.0-alpha1 Started in 0.047 seconds, Using 4.02 MB memory.
JABirchall commented 8 years ago

Yes that is a successful start.

JABirchall commented 8 years ago

This issue has been fixed, Thank you for your cooperation. If you encounter any other bugs do not hesitate to open a new issue thank you.