http://qs321.pair.com?node_id=1070292


in reply to Re: [POE::Component::IRC] Updating The IRC Log Watcher bot
in thread [POE::Component::IRC] Updating The IRC Log Watcher bot

EDIT: I just wanted to come back and say, after the initial frustration of the sql stuff failing, it was relatively easy to setup. I've still not got the whole web side of things working completely, the plack stuff works but apparently mod_fastcgi has been replaced by mod_fcgid in RHEL6 so I had a heck of a time getting apache to... well... not work. I'd prefer nginx anyway. I'll take a crack at configuring a reverse proxy to run starman and the static content together. This is actually the opposite of what I was looking for, but it's something that I was planning on implementing eventually

Hey, that's a pretty cool idea. But there seems to be an issue with the sql schema

I get the following error on a vanilla checkout:

~/ilbot$ ./install Checking dependencies ... dependencies all OK Database Access =============== You need a mysql database where ilbot stores the logs. For installation you need privileges for creating tables and indxes. For running ilbot, you need INSERT, SELECT and UPDATE privileges. Database host [localhost]> Database port [3306]> Database name [ilbot]> Database username [ilbot]> Database password> mysupersecretpassword Now testing your database connection... Database connection is fine, creating the schema for you... Schema creation failed: DBD::mysql::db do failed: You have an error in + your SQL syntax; check the manual that corresponds to your MySQL ser +ver version for the right syntax to use near 'DROP TABLE IF EXISTS `i +lbot_lines`; DROP TABLE IF EXISTS `ilbot_day`; DROP TABLE' at line 2 at ./install line 116, <$_[...]> chunk 1.

So I whacked the drop table lines, and I get the following error:

~/ilbot$ ./install Checking dependencies ... dependencies all OK Database Access =============== You need a mysql database where ilbot stores the logs. For installation you need privileges for creating tables and indxes. For running ilbot, you need INSERT, SELECT and UPDATE privileges. Database host [localhost]> Database port [3306]> Database name [ilbot]> Database username [ilbot]> Database password> mysupersecretpassword Now testing your database connection... Database connection is fine, creating the schema for you... Schema creation failed: DBD::mysql::db do failed: You have an error in + your SQL syntax; check the manual that corresponds to your MySQL ser +ver version for the right syntax to use near 'CREATE TABLE `ilbot_cha +nnel` ( `id` int(11) NOT NULL auto_increment, `ch' at line 2 at ./install line 116, <$_[...]> chunk 1.

I was able to import the schema manually, so I don't think it's actually an issue with the sql syntax

Anyway, I'm off to try and figure out how to get this thing to work now that it's "installed".

Thanks for the link

Replies are listed 'Best First'.
Re^3: [POE::Component::IRC] Updating The IRC Log Watcher bot
by moritz (Cardinal) on Jan 12, 2014 at 11:16 UTC

    I think I know what's going on. The C API of most databases are limited to one statement per API call, and the installer tries to run several statements at once.

    Since the installer doesn't know how to detect the end of SQL statements, it uses blank lines for detection. Thus this commit should fix it.

    As for the HTTP side, you can use any of the servers listed on http://plackperl.org/#servers. I hear Starman is a good choice. Then an nginx or Apache as reverse proxy should be pretty easy to set up.

    If you have any more questions, feel free to drop in on #ilbot on irc.freenode.org.