niemanlab / openfuego

Watching Twitter all day—so you don’t have to.
http://www.niemanlab.org/fuego
MIT License
175 stars 53 forks source link

Can't install #6

Open juanpablob opened 10 years ago

juanpablob commented 10 years ago

Hi there!

I'm trying to install OpenFuego but after configure it (database, twitter api and authorities) I followed the fetch.php instructions and I get this:

Lipibook:openfuego juanpablob$ php fetch.php -v

To start OpenFuego, run these commands:

    nohup /usr/bin/php /Users/juanpablob/Sites/openfuego/collect.php > /dev/null 2> /dev/null & echo $!
    nohup /usr/bin/php /Users/juanpablob/Sites/openfuego/consume.php > /dev/null 2> /dev/null & echo $!

Lipibook:openfuego juanpablob$ nohup /usr/bin/php /Users/juanpablob/Sites/openfuego/collect.php > /dev/null 2> /dev/null & echo $!
[7] 9827
9827
Lipibook:openfuego juanpablob$ nohup /usr/bin/php /Users/juanpablob/Sites/openfuego/consume.php > /dev/null 2> /dev/null & echo $!
[8] 9828
9828

[7]+  Stopped                 nohup /usr/bin/php /Users/juanpablob/Sites/openfuego/collect.php > /dev/null 2> /dev/null`

Instead of running the command as fetch.php shows, I ran first php collect.php -v

Lipibook:openfuego juanpablob$ php collect.php -v
Dying, 429
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Santiago' for 'CLT/-4.0/no DST' instead in /Users/juanpablob/Sites/openfuego/lib/Logger.class.php on line 60
[2013-07-31 10:06:38]: OpenFuego collector was terminated.

And after `php consume.php -v:

Lipibook:openfuego juanpablob$ php consume.php -v
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1005 Can't create table 'openfuego.openfuego_citizens' (errno: 150)' in /Users/juanpablob/Sites/openfuego/consume.php:81
Stack trace:
#0 /Users/juanpablob/Sites/openfuego/consume.php(81): PDOStatement->execute()

Could you help me to solve this issues in order to get openfuego work properly?

I'm using: MySQL 5.1.3 PHP 5.3.15 Apache 2.2.22

Thank you in advance!

Best.

phelps commented 10 years ago

@juanpablob What OS are you using? Are you running your own server or using shared hosting?

juanpablob commented 10 years ago

@phelps I tried running this on my laptop with OS X 10.7.5 and Linux CentOS 5.9, in both cases I get same errors.

phelps commented 10 years ago

@juanpablob Are you positive your database credentials are entered correctly, and that the user has write permissions? Otherwise it's odd that Fuego can't write to your database table.

phelps commented 10 years ago

Also, the "429" error indicates a problem building Fuego's universe. Make sure you have no more than 15 authorities specified in config.php. I have added a couple of patches that should improve this process.

juanpablob commented 10 years ago

@phelps : In both cases the database credentials are ok and the user has write permissions. I think the problem has relation with InnoDB (I searched about the error), because I tried changing the DB engine from InnoDB to MyISAM and the scripts works but until creating database schema, after that Fuego throws another errors related to InnoDB references in the script.

I have only 9 authorities. I'm gonna update the repo and try to install again. I will let you know if everything it's okay ;) Thank you for your time and support.

juanpablob commented 10 years ago

@phelps I already updated the repo and executed both scripts. This is the output:

Lipibook:openfuego juanpablob$ php collect.php -v

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'openfuego.openfuego_citizens' doesn't exist' in /Users/juanpablob/Sites/openfuego/app/Universe.class.php:82
Stack trace:
#0 /Users/juanpablob/Sites/openfuego/app/Universe.class.php(82): PDO->exec('TRUNCATE TABLE ...')
#1 /Users/juanpablob/Sites/openfuego/collect.php(54): OpenFuego\app\Universe->populate(Array, 1)
#2 {main}
  thrown in /Users/juanpablob/Sites/openfuego/app/Universe.class.php on line 82
[2013-08-02 00:33:05]: OpenFuego collector was terminated.
Lipibook:openfuego juanpablob$ php consume.php -v
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1005 Can't create table 'openfuego.openfuego_citizens' (errno: 150)' in /Users/juanpablob/Sites/openfuego/consume.php:81
Stack trace:
#0 /Users/juanpablob/Sites/openfuego/consume.php(81): PDOStatement->execute()
´´´
phelps commented 10 years ago

Hmm, Fuego definitely requires InnoDB tables. It looks like it's failing when trying to populate the citizens table. I would suggest creating a fresh database and trying again, but it seems you've done that if you've tried it twice.

juanpablob commented 10 years ago

Yes, indeed. I've been searching about the error 1005 of PDO and I found this, maybe you might know what is about, because I don't understand much InnoDB: http://stackoverflow.com/questions/2884822/problem-creating-a-database-with-php-pdo?answertab=votes#tab-top Look the answer.

phelps commented 10 years ago

Maybe this is silly, but try running consume.php a few seconds BEFORE collect.php.

It seems my script is trying to populate a database table that doesn't exist yet. By running consume.php first, you're ensuring the database is initializing.

If this ends up fixing it for you, I can write a patch.

Andrew.

On Fri, Aug 2, 2013 at 4:11 PM, Juan Pablo Barrientos Lagos < notifications@github.com> wrote:

Yes, indeed. I've been searching about the error 1005 of PDO and I found this, maybe you might know what is about, because I don't understand much InnoDB: http://stackoverflow.com/questions/2884822/problem-creating-a-database-with-php-pdo?answertab=votes#tab-topLook the answer.

— Reply to this email directly or view it on GitHubhttps://github.com/niemanlab/openfuego/issues/6#issuecomment-22031787 .

juanpablob commented 10 years ago

Ok, I will try doing that. Thank you!