http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13053
Katrin Fischer <katrin.fisc...@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32764|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fisc...@bsz-bw.de> --- Created attachment 32767 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32767&action=edit [PASSED QA] Bug 13053 - Do not use template cache when from commandline You may define in config a folder (usually /tmp) for TT cache : template_cache_dir in etc/koha-conf.xml. Some perl pages may be launched from commandline, like tools/export.pl. Also, the script gather_print_notices.pl uses C4::Templates. The problem is that when script is launched from Apache, the Unix owner of cache files will be www-data. When script is launched from commandline, like in a cronjob, the Unix owner will be different (like a user named "koha"), causing a crash because cache files can only be read by its owner. This script disables the template cache if perl script is called from commandline. This cache is certainly only useful for web access. Using GATEWAY_INTERFACE env var comes from tools/export.pl Test plan : - Use a dev install of koha installed in a user home, ie "/home/kohadev" - Define a folder for template_cache_dir in etc/koha-conf.xml. For example : <template_cache_dir>/tmp</template_cache_dir> - Check there is no cached templates already in this forder - Create a file "bib.list" containing a few existing biblionumbers - As user kohadev, launch : tools/export.pl --record-type=bibs --id_list_file=bib.list - Look at cache folder => Without patch you see cache files owned by user kohadev => With patch there are no cache files - Use the Koha interfaces OPAC and Intranet => Without patch you get an error : Template process failed: file error - cache failed to write ... => With patch you have no error and cache files are generated with Apache user as owner Signed-off-by: Chris Cormack <ch...@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <katrin.fischer...@web.de> Works as described, good test plan! Passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/