ikoniaris / kippo-graph

Visualize statistics from a Kippo SSH honeypot
http://bruteforce.gr/kippo-graph
Other
134 stars 54 forks source link

Fatal error: Uncaught exception 'PDOException #63

Open viemmsakh opened 7 years ago

viemmsakh commented 7 years ago

I've been using cowrie/kippo-graph on my raspberry pi for a couple months and decided to upgrade to a desktop. Installed Lubuntu 17.04, cowrie, and configured mysql, there are items showing up in the DB. However, when browsing to the overview or input pages nothing shows. I do get graphs generated because they show up under the graph gallery.

I added :

<?php
ini_set("display_errors", 1);
?>

to the top of my kippo-graph.php to see what was happening and I get the following:

Fatal error: Uncaught exception 'PDOException' with message 'Could not connect to database (cowrie).' in /var/www/html/kippo-graph/include/rb.php:761 Stack trace: #0 /var/www/html/kippo-graph/include/rb.php(598): RedBeanPHP\Driver\RPDO->connect() #1 /var/www/html/kippo-graph/include/rb.php(785): RedBeanPHP\Driver\RPDO->runQuery('SELECT password...', Array) #2 /var/www/html/kippo-graph/include/rb.php(3035): RedBeanPHP\Driver\RPDO->GetAll('SELECT password...', Array) #3 /var/www/html/kippo-graph/include/rb.php(9305): RedBeanPHP\Adapter\DBAdapter->get('SELECT password...', Array) #4 /var/www/html/kippo-graph/include/rb.php(9936): RedBeanPHP\Facade::query('get', 'SELECT password...', Array) #5 /var/www/html/kippo-graph/class/KippoGraph.class.php(132): RedBeanPHP\Facade::getAll('SELECT password...') #6 /var/www/html/kippo-graph/class/KippoGraph.class.php(22): KippoGraph->createTop10Passwords() #7 /var/www/html/kippo-graph/kippo-graph.php(42): KippoGraph->generateKippoGraphCharts() #8 {main} thrown in /var/www/html/kippo-graph/include/rb.php on line 761

I have tried both kippo-graph 1.5.1 and cloning the github. The error is present with both. I though at first it could be because Lubuntu 17.04 uses php7 so I found some backwater ppa and installed php5.6; the issue is still present.

jdmoore0883 commented 6 years ago

I am using php7.0 with(out) issue (at least nothing like this). I doubt that's the issue.

There's a line in the logs that makes me wonder...:" 'Could not connect to database (cowrie).'

What does your database and kippo-graph config look like?

fwuen commented 5 years ago

I'm having the same issue. Any solution for this?

jmalghem commented 4 years ago

Got the same error because php was not properly installed with mysql : apt install php7.2-mysql phpenmod pdo_mysql