Hello, I was poking around the installation of koha that I made using the tarball linked earlier by Galen Charlton. Once I got the install done and entered some settings I tried to use the bulkmarcimport.pl command. Which failed with the following message: Undefined subroutine &main::GetMarcFromKohaField called at ./bulkmarcimport.pl line 219. I haven't figured out how to setup the Zebra index yet because the examples I've looked at so far all refer to there being records, but I don't have any yet. I was hoping that maybe running this command would give me some useful hints. Regards, Bradley Peters
On 2007/12/13, at 5:08 PM, Bradley Peters wrote:
Hello,
I was poking around the installation of koha that I made using the tarball linked earlier by Galen Charlton. Once I got the install done and entered some settings I tried to use the bulkmarcimport.pl command. Which failed with the following message:
Undefined subroutine &main::GetMarcFromKohaField called at ./bulkmarcimport.pl line 219.
heya Bradley , easy questions 1st have you got your KOHA_CONF var set ok? and your PERL5LIB set var set too? those are the usual suspects.. mason$/koha/production/koha/misc/migration_tools$ export declare -x KOHA_CONF="/opt/koha/etc/koha.xml" declare -x PERL5LIB="/opt/koha/production/koha" PS: your paths will be different to mine :) then... mason$/koha/production/koha/misc/migration_tools$ perl ./ bulkmarcimport.pl -file ~/5000.mrc ........................................................................ ......100 ........................................................................ ...200 ........................................................................ ...300 Cheers, Mason -- Mason James mason.james@liblime.com Programmer www.liblime.com LibLime +64 21 542 117
On 12/12/07, Mason James <mason.james@liblime.com> wrote:
have you got your KOHA_CONF var set ok? and your PERL5LIB set var set too?
Okay, I didn't set the PERL5LIB variable. I was using some instructions I found on the Wiki that only mentioned KOHA_CONF. I've been trying to read the included documentation, but there seem to be some different systems being described. The ./koha/doc/info/HINTS file refers to an include field in the "koha.conf" which I thought was handling location of the Perl lib. Is this KOHA_CONF supposed to point at the koha-conf.xml file? I will have to try that again, because that is what I did originally but I got a lot of messages that looked like errors. I went looking for more information and found the files in the ./koha/doc/info folder. (All my files are in one tree because I used the single method of the installer.) Thanks, I will keep poking around. Regards, Bradley Peters.
On 12/13/07, Bradley Peters <koha@moberley.com> wrote:
On 12/12/07, Mason James <mason.james@liblime.com> wrote:
have you got your KOHA_CONF var set ok? and your PERL5LIB set var set too?
Okay, I didn't set the PERL5LIB variable. I was using some instructions I found on the Wiki that only mentioned KOHA_CONF.
I've been trying to read the included documentation, but there seem to be some different systems being described. The ./koha/doc/info/HINTS file refers to an include field in the "koha.conf" which I thought was handling location of the Perl lib.
koha.conf is the default name for koha-conf.xml (and probably needs to be changed to match Koha 3 reality).
Is this KOHA_CONF supposed to point at the koha-conf.xml file? I will have to try that again, because that is what I did originally but I got a lot of messages that looked like errors.
KOHA_CONF should point to koha-conf.xml... PERL5LIB should point to the location of the C4 directory.... But the current installer should have taken care of this if I'm not mistaken.... What kind of errors did you get? -- Chris Nighswonger Faculty Member Network & Systems Director Foundations Bible College & Seminary www.foundations.edu www.fbcradio.org
On 12/13/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
What kind of errors did you get?
$ export PERL5LIB="/home/bdp/koha/lib/C4/" $ export KOHA_CONF="/home/bdp/koha/etc/koha-conf.xml" $ ./bulkmarcimport.pl -t -file /home/bdp/Desktop/PLS/MBOMDVD.MRC <yazgfs> isn't a variable assignment, skipping it<!-- [scheme:]host[:port][/databaseName] --> isn't a variable assignment, skipping it<!-- scheme: tcp, ssl, unix, http, sru --> isn't a variable assignment, skipping it ... et cetera through the contents of koha-conf.xml ... <includes>/home/bdp/koha/intranet/htdocs/intranet-tmpl/default/en/includes/</includes> isn't a variable assignment, skipping it</config> isn't a variable assignment, skipping it</yazgfs> isn't a variable assignment, skipping itDBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 DBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 Can't call method "selectrow_array" on an undefined value at /usr/local/share/perl/5.8.8/C4/Context.pm line 366.
On 12/14/07, Bradley Peters <koha@moberley.com> wrote:
On 12/13/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
What kind of errors did you get?
$ export PERL5LIB="/home/bdp/koha/lib/C4/"
I believe this should be more like /home/bdp/koha/lib It points to the directory where C4 is located. I have a question about the 'lib' subdir.
$ export KOHA_CONF="/home/bdp/koha/etc/koha-conf.xml"
These should be set in koha-httpd.conf for both opac and intranet.... ie. something like: SetEnv KOHA_CONF "/home/bdp/koha/etc/koha-conf.xml" SetEnv PERL5LIB "/home/bdp/koha/lib"
$ ./bulkmarcimport.pl -t -file /home/bdp/Desktop/PLS/MBOMDVD.MRC
<yazgfs> isn't a variable assignment, skipping it<!-- [scheme:]host[:port][/databaseName] --> isn't a variable assignment, skipping it<!-- scheme: tcp, ssl, unix, http, sru --> isn't a variable assignment, skipping it
... et cetera through the contents of koha-conf.xml ...
<includes>/home/bdp/koha/intranet/htdocs/intranet-tmpl/default/en/includes/</includes> isn't a variable assignment, skipping it</config> isn't a variable assignment, skipping it</yazgfs> isn't a variable assignment, skipping
Seems that I have seen this before, but can't remember exactly what caused it. Maybe the pathing issues above. Anyone else have an idea?
itDBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 DBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 Can't call method "selectrow_array" on an undefined value at /usr/local/share/perl/5.8.8/C4/Context.pm line 366.
It appears that 'bdp'@'localhost' does not have sufficient permissions. In mysql what does SHOW GRANTS; say? While I have not had a chance to exercise Galen's new installer, it should take care of setting up these env vars automagically. I'll try to give the installer a whirl after lunch today and see what happens for me. Regards -- Chris Nighswonger Faculty Member Network & Systems Director Foundations Bible College & Seminary www.foundations.edu www.fbcradio.org
On 12/14/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
itDBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 DBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 Can't call method "selectrow_array" on an undefined value at /usr/local/share/perl/5.8.8/C4/Context.pm line 366.
It appears that 'bdp'@'localhost' does not have sufficient permissions. In mysql what does SHOW GRANTS; say?
bdp is the username I'm logged into my terminal as. I don't have a user by that name on the MySQL server at all. I thought that the command line tools would use the "kohaadmin" username from the configuration file, but it appears that is not the case. Regards, Bradley Peters.
On Fri, 2007-12-14 at 07:47 -0500, Chris Nighswonger wrote:
On 12/14/07, Bradley Peters <koha@moberley.com> wrote:
itDBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 DBI connect(':','',...) failed: Access denied for user 'bdp'@'localhost' (using password: NO) at /usr/local/share/perl/5.8.8/C4/Context.pm line 411 Can't call method "selectrow_array" on an undefined value at /usr/local/share/perl/5.8.8/C4/Context.pm line 366.
It appears that 'bdp'@'localhost' does not have sufficient permissions. In mysql what does SHOW GRANTS; say?
While I have not had a chance to exercise Galen's new installer, it should take care of setting up these env vars automagically. I'll try to give the installer a whirl after lunch today and see what happens for me.
Regards
Perhaps the problem is that no password was supplied?
On 2007/12/14, at 8:25 PM, Bradley Peters wrote:
On 12/13/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
What kind of errors did you get?
$ export PERL5LIB="/home/bdp/koha/lib/C4/" $ export KOHA_CONF="/home/bdp/koha/etc/koha-conf.xml" $ ./bulkmarcimport.pl -t -file /home/bdp/Desktop/PLS/MBOMDVD.MRC
<yazgfs> isn't a variable assignment, skipping it<!-- [scheme:]host[:port][/databaseName] --> isn't a variable assignment, skipping it<!-- scheme: tcp, ssl, unix, http, sru --> isn't a variable assignment, skipping it
... et cetera through the contents of koha-conf.xml ...
Hi Bradley, ive just had a quick look at this email , and it looks like your xml parser is complaining about a syntax error in your koha-conf.xml file... or did i miss the problem... just my 2 cents :) Cheers, Mason -- Mason James mason.james@liblime.com Programmer www.liblime.com LibLime +64 21 542 117
On 12/14/07, Mason James <mason.james@liblime.com> wrote:
ive just had a quick look at this email , and it looks like your xml parser is complaining about a syntax error in your koha-conf.xml file...
How would you suggest I test that? The koha-conf.xml was created by the installer and I haven't done anything with it except open it up to review the contents. Thanks, Bradley Peters.
"Bradley Peters" <koha@moberley.com> wrote:
How would you suggest I test that? The koha-conf.xml was created by the installer and I haven't done anything with it except open it up to review the contents.
Either use xmllint (I forget syntax) or tidy -e -xml koha-conf.xml. Regards, -- MJ Ray http://mjr.towers.org.uk/email.html tel:+44-844-4437-237 - Webmaster-developer, statistician, sysadmin, online shop builder, consumer and workers co-operative member http://www.ttllp.co.uk/ - Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/
On 12/13/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote: What kind of errors did you get?
On 12/14/07, Mason James <mason.james@liblime.com> wrote:
ive just had a quick look at this email , and it looks like your xml parser is complaining about a syntax error in your koha-conf.xml file...
I got the PERL5LIB variable entered correctly (the directory containing C4 rather than the C4 directory itself). Now when I run this: $ export PERL5LIB=/home/bdp/koha/lib $ export KOHA_CONF=/home/bdp/koha/etc/koha-conf.xml $ ./bulkmarcimport.pl -t -file /home/bdp/Desktop/PLS/MBOMDVD.MRC I get this returned Unable to recognise encoding of this document at /usr/share/perl5/XML/SAX/PurePerl/EncodingDetect.pm line 96. ... (error message repeats 9 times) ... TESTING MODE ONLY DOING NOTHING =============== ................................................................................100.............................................................................200.........................................................................................289 MARC records done in 0.976025819778442 seconds I'm not sure what that error means though. Regards, Bradley Peters.
Hi, On 12/14/07, Bradley Peters <koha@moberley.com> wrote:
On 12/13/07, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
What kind of errors did you get?
$ export PERL5LIB="/home/bdp/koha/lib/C4/" $ export KOHA_CONF="/home/bdp/koha/etc/koha-conf.xml" $ ./bulkmarcimport.pl -t -file /home/bdp/Desktop/PLS/MBOMDVD.MRC
<yazgfs> isn't a variable assignment, skipping it<!-- [scheme:]host[:port][/databaseName] --> isn't a variable assignment, skipping it<!-- scheme: tcp, ssl, unix, http, sru --> isn't a variable assignment, skipping it
The "isn't a variable assignment" message is coming from an older (i.e., pre-3.0 or perhaps a really old 3) version of C4/Context.pm. I'm guessing that you also have Koha 2 installed on that box. Since you've subsequently corrected PERL5LIB, the error message went away. Regards, Galen -- Galen Charlton Koha Application Developer LibLime galen.charlton@liblime.com p: 1-888-564-2457 x709
On 12/16/07, Galen Charlton <galen.charlton@liblime.com> wrote:
The "isn't a variable assignment" message is coming from an older (i.e., pre-3.0 or perhaps a really old 3) version of C4/Context.pm. I'm guessing that you also have Koha 2 installed on that box.
Yes, I did install Koha 2. Thanks for the explanation. Sincerely, Bradley Peters.
participants (6)
-
Bradley Peters -
Chris Nighswonger -
Galen Charlton -
Mason James -
Michael Hafen -
MJ Ray