Bug 6008 - Installation might fail it user web doesn't have in its path the database command path
Summary: Installation might fail it user web doesn't have in its path the database com...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 3.8
Hardware: All Other
: P5 - low enhancement (vote)
Assignee: Salva Zaragoza Rubio
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 16:13 UTC by Salva Zaragoza Rubio
Modified: 2013-12-05 20:05 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch to find the mysql/psql commands in Installer.pm with "which" and "whereis" before (2.26 KB, patch)
2011-03-30 16:21 UTC, Salva Zaragoza Rubio
Details | Diff | Splinter Review
Bug 6008 - Locating mysql/psql commands on Installer.pm (2.35 KB, patch)
2012-02-18 07:27 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Salva Zaragoza Rubio 2011-03-30 16:13:42 UTC
In Installer.pm when is looking for the system command to dump a file into the database it might fail if the web user doesn't have it in its path env variable.

E.g.: with OpenBSD 4.8 the web user "www" doesn't have the path to the installed mysql bin:
/usr/local/bin/mysql and fails in the web installer.
Comment 1 Salva Zaragoza Rubio 2011-03-30 16:21:19 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-02-18 07:27:47 UTC
Created attachment 7747 [details] [review]
Bug 6008 - Locating mysql/psql commands on Installer.pm

In Installer.pm when is looking for the system command to dump a file into the database
it might fail if the web user doesn't have it in its path. So we add before a search with
"which" and "whereis" commands, if they fail the command is itself without path.

E.g.: with OpenBSD 4.8 the web user "www" doesn't have the path to the installed mysql bin:
/usr/local/bin/mysql and fails in the web installer.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Seems to work fine, has a good default for if it fails to find that
path
Comment 3 Marcel de Rooy 2012-02-20 20:59:17 UTC
This patch changes the mode of Installer.pm to 755. Please undo.
Comment 4 Paul Poulain 2012-02-27 14:39:24 UTC
QA comment
* tiny patch in size
* tested on my linux box, no visible change, worked before, work after. Will hopefully improve behaviour for OpenBSD
Comment 5 Jared Camins-Esakov 2012-12-31 00:41:06 UTC
There have been no further reports of problems so I am marking this bug resolved.