Koha Cache -- Problem with Changing Admin Password?
Does Koha use a cache to remember config settings in OPAC and Intranet? I updated koha_conf.xml to change the password and now in the librarian view and OPAC view I get this error: Access denied for user 'kohaadmin'@'localhost' (using password: YES) at /home/koha/kohaclone/C4/Context.pm line 667. Compilation failed in require at /home/koha/kohaclone/C4/Circulation.pm line 25. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Circulation.pm line 25. Compilation failed in require at /home/koha/kohaclone/C4/Overdues.pm line 24. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Overdues.pm line 24. Compilation failed in require at /home/koha/kohaclone/C4/Members.pm line 27. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Members.pm line 27. Compilation failed in require at /home/koha/kohaclone/C4/Auth.pm line 31. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Auth.pm line 31. Compilation failed in require at /home/koha/kohaclone/opac/opac-search.pl line 12. BEGIN failed--compilation aborted at /home/koha/kohaclone/opac/opac-search.pl line 12. Here's what I've done: 1. changed the password in koha_conf.xml. 2. updated the kohaadmin password in mysql for koha dbase 3. restarted apache2 4. checked if in terminal I can access mysql with new password -- yes I can 5. when the above error echos -- I was inserted the password it was getting in Context.pm line 667 - that password was the former password. 6. in Context.pm I hard code the new password and there's success. Does anyone have any ideas? Thanks, Rick ------------------------------------------- Rick Forristall Programmer Analyst Goodwill of Central AZ 602.535.4078 -------------------------------------------
Hi Rick, 2009/12/23 Richard Forristall <Richard.Forristall@goodwillaz.org>:
Does Koha use a cache to remember config settings in OPAC and Intranet?
Not these.
I updated koha_conf.xml to change the password and now in the librarian view and OPAC view I get this error:
Access denied for user 'kohaadmin'@'localhost' (using password: YES) at /home/koha/kohaclone/C4/Context.pm line 667. Compilation failed in require at /home/koha/kohaclone/C4/Circulation.pm line 25.
This line indicates that somehow the password in koha-conf.xml does not match the one in mysql. Can you access the db via 'mysql -ukohaadmin -p' with the same password presently in koha-conf.xml? Kind Regards, Chris
OK, well I found the issue - but some background info is required so anyone reading this can understand and apply to their situation. We installed the Koha unconfigured virtual appliance (VMDK) from here: http://kylehall.info/index.php/projects/koha/koha-virtual-appliance/ Normally one expects the admin password to reside in something like: /koha/etc/koha-conf.xml A search of this file found a location here: /home/koha/koha-dev/etc/koha-conf.xml which had the default password value like this <db_scheme>mysql</db_scheme> <database>koha</database> <hostname>localhost</hostname> <port>3306</port> <user>kohaadmin</user> <pass>defaultpasswordwashere</pass> A copy of this file is also in here: /home/koha/kohaclone/blib/KOHA_CONF_DIR/koha-conf.xml I was originally changing the password in the second location, and not the first - - once I found and changed it in the first file, all seemed to work (this was after I changed the kohaadmin@localhost user's password in mysql and restarted apache2) I believe if you look in the Koha file in folder C4/Context.pm for these lines you see that the program looks for the first available readable file for a koha-conf.xml and uses it - # Koha's main configuration file koha-conf.xml # is searched for according to this priority list: # # 1. Path supplied via use C4::Context '/path/to/koha-conf.xml' # 2. Path supplied in KOHA_CONF environment variable. # 3. Path supplied in INSTALLED_CONFIG_FNAME, as long # as value has changed from its default of # '__KOHA_CONF_DIR__/koha-conf.xml', as happens # when Koha is installed in 'standard' or 'single' # mode. # 4. Path supplied in CONFIG_FNAME. # # The first entry that refers to a readable file is used. use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml"; # Default config file, if none is specified my $INSTALLED_CONFIG_FNAME = '__KOHA_CONF_DIR__/koha-conf.xml'; # path to config file set by installer # __KOHA_CONF_DIR__ is set by rewrite-confg.PL # when Koha is installed in 'standard' or 'single' # mode. If Koha was installed in 'dev' mode, # __KOHA_CONF_DIR__ is *not* rewritten; instead # developers should set the KOHA_CONF environment variable $context = undef; # Initially, no context is set @context_stack = (); # Initially, no saved contexts ================================================================= So, lesson learned? 1. look for all locations of "koha-conf.xml" and change the password in all locations. 2. restart apache2 (/etc/init.d/apache2 restart 3. change kohaadmin@localhost user's password in mysql **************************************************************** =========== { SPECIAL THANKS }=================================== Chris Nighswonger from Foundations Bible College -- Thanks Chris for trying to figure this out with me! ===========/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/============= Everyone have a great Christmas! Thanks, Rick ------------------------------------------- Rick Forristall Programmer Analyst Goodwill of Central AZ 602.535.4078 ------------------------------------------- -----Original Message----- From: Chris Nighswonger [mailto:cnighswonger@foundations.edu] Sent: Wednesday, December 23, 2009 6:43 PM To: Richard Forristall Cc: koha-devel@lists.koha.org Subject: Re: [Koha-devel] Koha Cache -- Problem with Changing Admin Password? Hi Rick, 2009/12/23 Richard Forristall <Richard.Forristall@goodwillaz.org>:
Does Koha use a cache to remember config settings in OPAC and Intranet?
Not these.
I updated koha_conf.xml to change the password and now in the librarian view and OPAC view I get this error:
Access denied for user 'kohaadmin'@'localhost' (using password: YES) at /home/koha/kohaclone/C4/Context.pm line 667. Compilation failed in require at /home/koha/kohaclone/C4/Circulation.pm line 25.
This line indicates that somehow the password in koha-conf.xml does not match the one in mysql. Can you access the db via 'mysql -ukohaadmin -p' with the same password presently in koha-conf.xml? Kind Regards, Chris
Hey Rick, Glad to hear you figured it out! Kind Regards, Chris On Thu, Dec 24, 2009 at 1:10 PM, Richard Forristall <Richard.Forristall@goodwillaz.org> wrote:
OK, well I found the issue - but some background info is required so anyone reading this can understand and apply to their situation.
We installed the Koha unconfigured virtual appliance (VMDK) from here: http://kylehall.info/index.php/projects/koha/koha-virtual-appliance/
Normally one expects the admin password to reside in something like: /koha/etc/koha-conf.xml
A search of this file found a location here: /home/koha/koha-dev/etc/koha-conf.xml which had the default password value like this <db_scheme>mysql</db_scheme> <database>koha</database> <hostname>localhost</hostname> <port>3306</port> <user>kohaadmin</user> <pass>defaultpasswordwashere</pass>
A copy of this file is also in here: /home/koha/kohaclone/blib/KOHA_CONF_DIR/koha-conf.xml
I was originally changing the password in the second location, and not the first - - once I found and changed it in the first file, all seemed to work (this was after I changed the kohaadmin@localhost user's password in mysql and restarted apache2)
I believe if you look in the Koha file in folder C4/Context.pm for these lines you see that the program looks for the first available readable file for a koha-conf.xml and uses it - # Koha's main configuration file koha-conf.xml # is searched for according to this priority list: # # 1. Path supplied via use C4::Context '/path/to/koha-conf.xml' # 2. Path supplied in KOHA_CONF environment variable. # 3. Path supplied in INSTALLED_CONFIG_FNAME, as long # as value has changed from its default of # '__KOHA_CONF_DIR__/koha-conf.xml', as happens # when Koha is installed in 'standard' or 'single' # mode. # 4. Path supplied in CONFIG_FNAME. # # The first entry that refers to a readable file is used.
use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml"; # Default config file, if none is specified
my $INSTALLED_CONFIG_FNAME = '__KOHA_CONF_DIR__/koha-conf.xml'; # path to config file set by installer # __KOHA_CONF_DIR__ is set by rewrite-confg.PL # when Koha is installed in 'standard' or 'single' # mode. If Koha was installed in 'dev' mode, # __KOHA_CONF_DIR__ is *not* rewritten; instead # developers should set the KOHA_CONF environment variable
$context = undef; # Initially, no context is set @context_stack = (); # Initially, no saved contexts
================================================================= So, lesson learned?
1. look for all locations of "koha-conf.xml" and change the password in all locations.
2. restart apache2 (/etc/init.d/apache2 restart
3. change kohaadmin@localhost user's password in mysql
**************************************************************** =========== { SPECIAL THANKS }=================================== Chris Nighswonger from Foundations Bible College -- Thanks Chris for trying to figure this out with me! ===========/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/=============
Everyone have a great Christmas!
Thanks,
Rick ------------------------------------------- Rick Forristall Programmer Analyst Goodwill of Central AZ 602.535.4078 -------------------------------------------
-----Original Message----- From: Chris Nighswonger [mailto:cnighswonger@foundations.edu] Sent: Wednesday, December 23, 2009 6:43 PM To: Richard Forristall Cc: koha-devel@lists.koha.org Subject: Re: [Koha-devel] Koha Cache -- Problem with Changing Admin Password?
Hi Rick,
2009/12/23 Richard Forristall <Richard.Forristall@goodwillaz.org>:
Does Koha use a cache to remember config settings in OPAC and Intranet?
Not these.
I updated koha_conf.xml to change the password and now in the librarian view and OPAC view I get this error:
Access denied for user 'kohaadmin'@'localhost' (using password: YES) at /home/koha/kohaclone/C4/Context.pm line 667. Compilation failed in require at /home/koha/kohaclone/C4/Circulation.pm line 25.
This line indicates that somehow the password in koha-conf.xml does not match the one in mysql.
Can you access the db via 'mysql -ukohaadmin -p' with the same password presently in koha-conf.xml?
Kind Regards, Chris
2009/12/25 Richard Forristall <Richard.Forristall@goodwillaz.org>:
OK, well I found the issue - but some background info is required so anyone reading this can understand and apply to their situation.
We installed the Koha unconfigured virtual appliance (VMDK) from here: http://kylehall.info/index.php/projects/koha/koha-virtual-appliance/
Normally one expects the admin password to reside in something like: /koha/etc/koha-conf.xml
A search of this file found a location here: /home/koha/koha-dev/etc/koha-conf.xml which had the default password value like this <db_scheme>mysql</db_scheme> <database>koha</database> <hostname>localhost</hostname> <port>3306</port> <user>kohaadmin</user> <pass>defaultpasswordwashere</pass>
A copy of this file is also in here: /home/koha/kohaclone/blib/KOHA_CONF_DIR/koha-conf.xml
I was originally changing the password in the second location, and not the first - - once I found and changed it in the first file, all seemed to work (this was after I changed the kohaadmin@localhost user's password in mysql and restarted apache2)
I believe if you look in the Koha file in folder C4/Context.pm for these lines you see that the program looks for the first available readable file for a koha-conf.xml and uses it - # Koha's main configuration file koha-conf.xml # is searched for according to this priority list: # # 1. Path supplied via use C4::Context '/path/to/koha-conf.xml' # 2. Path supplied in KOHA_CONF environment variable. # 3. Path supplied in INSTALLED_CONFIG_FNAME, as long # as value has changed from its default of # '__KOHA_CONF_DIR__/koha-conf.xml', as happens # when Koha is installed in 'standard' or 'single' # mode. # 4. Path supplied in CONFIG_FNAME. # # The first entry that refers to a readable file is used.
use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml"; # Default config file, if none is specified
my $INSTALLED_CONFIG_FNAME = '__KOHA_CONF_DIR__/koha-conf.xml'; # path to config file set by installer # __KOHA_CONF_DIR__ is set by rewrite-confg.PL # when Koha is installed in 'standard' or 'single' # mode. If Koha was installed in 'dev' mode, # __KOHA_CONF_DIR__ is *not* rewritten; instead # developers should set the KOHA_CONF environment variable
$context = undef; # Initially, no context is set @context_stack = (); # Initially, no saved contexts
================================================================= So, lesson learned?
1. look for all locations of "koha-conf.xml" and change the password in all locations.
Heres a tip, look in the /etc/apache2/sites-enabled/koha (or whatever your koha-httpd.conf file is called. Find what flle it has set as KOHA_CONF .. then change that one. That is the file it will be using. Then the rest of the steps work fine :)
2. restart apache2 (/etc/init.d/apache2 restart
3. change kohaadmin@localhost user's password in mysql
**************************************************************** =========== { SPECIAL THANKS }=================================== Chris Nighswonger from Foundations Bible College -- Thanks Chris for trying to figure this out with me! ===========/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/=============
Everyone have a great Christmas!
Chris
participants (3)
-
Chris Cormack -
Chris Nighswonger -
Richard Forristall