[Koha-devel] rewrite-config.PL
MJ Ray
mjr at phonecoop.coop
Tue Jan 19 02:55:39 CET 2010
Thomas Krichel <krichel at openlib.org> wrote:
> I had problems with rewrite-config.PL with a commercial hosting
> company where the hostname() gave a wrong answer. I suggest to
> replace to call to hostname() in rewrite-config.PL with calls to
> system utilities that a user could use to verify the state of the
> system. [...]
If hostname() is giving a wrong answer, the system has some problems
and there is no guarantee that the system utilities will give a
correct answer either. Also, hostname will try the system utilities
in some situations already - see man Sys::Hostname:
Attempts several methods of getting the system hostname and then caches
the result. It tries the first available of the C library's gethost-
name(), `$Config{aphostname}`, uname(2), "syscall(SYS_gethostname)",
`hostname`, `uname -n`, and the file /com/host. If all that fails it
"croak"s.
It might be worth checking which of those is giving your wrong answer,
to see if there is a misconfiguration by the hosting company which
might come back to haunt you later.
On awkward systems like that, it would be safer if the operator
sets the WEBSERVER_HOST and WEBSERVER_IP environment variables
before the installation.
Hope that explains,
--
MJ Ray (slef) Webmaster and LMS developer at | software
www.software.coop http://mjr.towers.org.uk | .... co
IMO only: see http://mjr.towers.org.uk/email.html | .... op
More information about the Koha-devel
mailing list