Re: HOSTNAME Environment variable

From: Date: Tue, 21 Feb 2006 09:09:53 +0000
Subject: Re: HOSTNAME Environment variable
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-230792@lists.php.net to get a copy of this message
On 2/21/06, Ruben Rubio Rey <ruben@rentalia.com> wrote: > Strange. Its already set (in hostname and "echo $HOSTNAME"). I have > realized that is working on version (in my servers) 5.0.5 and its not > working in 5.0.4 version. Is it an old bug? Im updating, we ll see .... Have you rebooted your machine since you changed the hostname? I don't know where PHP/Apache gets the hostname variable from - there are quite a few places where that variable is stored on a linux system - but most services reads the /etc/hostname file upon boot, therefor the need for a restart after changing it. You might want to check the contents of /proc/sys/kernel/hostname, and even changing it by issuing: echo your_hostname > /proc/sys/kernel/hostname If it still doesn't work, reboot to be sure. -- Kim Christensen kim.christensen@gmail.com

« previous php.general (#230792) next »