Import voterfile - can't run script
Hi -
Have successfully installed Advokit, and followed instructions to create first campaign, first leader, etc. Logged in as leader, set up the campaign and imported first CSV of approx. 1000 voters. Mapped fields successfully, and it processed all voters in the file, gave me a confirmation screen that told me I had to run a script.
First problem was that I couldn't reset permissions of the script (I don't have telnet access to the server, and tried to reset through ftp client - but because the files were created by webserver, I didn't have rights to change permissions). My webhost reset file ownership, but this seems like it'll be a problem every time I try to import a file, no?
Anyway, once my webhost helped with permissions, I was able to chmod to 755. But when I try to run the scripts (again, from my browser since I don't have telnet access), I get a '500 Internal Server Error'.
Any idea what it'll take to complete the voter file import?
--Rick
Perl issues
Hi,
First off I would highly recommend you move over to the listserve to ask these sorts of questions. These forums are not monitored regularly and you probably won't get the best attention here. The Perl was a necessary evil because there was a lot of string manipulation that had to happen. I too am a Perl novice and was stumped for a while. I was able to get everything working however with a correct install of the Perl libraries (for help I googled DBI PERL INSTALL and was able to find a very nice set of step by step instructions. Please join us over on the listserve (see Forum Topics - EMail Lists on the sidebar) or email us directly - info -AT- voter2voter.org.
Import appears to have worked, but...
but each time I've received an error when trying to execute script. So original question remains (re: file ownership and permissions), but at least I've got some data to work with...
Could be a file permissions issue
On some systems you have to change permissions on the perl scripts in order to run them from the command line. Here's what I do:
- telnet or ssh to the server
- change to the ../files/Scripts directory
- chmod 755 * (this makes the script files executable)
- perl whatever.csv.pl
Should move questions like this to the Dev list
Hi Rick,
I think you already have, but I'll repeat here anyway, you should ask questions like this on the dev listserve. These forums aren't being heavily used right now.

DBI problem
I have run into a similar problem when I try to upload voter data from the generated pl script. The script supposedly places data into my MYSQL tables.* I had never played with PERL before, so found out I had to install PERL, DBI, and DBD before running the script. I did so (installed ActivePerl, DBI, a DBD for MySQL. Still no joy. I keep getting the message that says:
Can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI"?)
The beginning of the script reads:
#!/usr/bin/perl -w
use strict;
use DBI;
my $dsn = "DBI:mysql:database=tc1;host=localhost;port=3306";
my $dbh = DBI->connect( $dsn, "root", "", { RaiseError => 0, PrintError =>1, AutoCommit => 1 } ) or die ( "Cannot connect to db: $!\n" );
Beats me what this means and I have browsed around on the net to find out. All the helps assume you knew so much you didn't need to ask in the first place. I'm clueless.
PS: Why go to the trouble of using PERL to do this!!!?? It's a simple PHP/MySQL solution!! It's like taking a 747 to the corner store for a loaf of bread? A touch expensive and prone to significant error.