sbhmike
12-10-2002, 01:42 PM
I just set up a new server ,everything went fine except for the php info displayed?
i get the following when listing the php info
System Linux plain.rackshack.net 2.4.19 #1 Mon Feb 25 09:15:47 EST 2002 i686 unknown
Linux plain.rackshack.net is not my host name ,this should be sbh.myserver.com
Anyone got any ideas where php is reading this from ,everything else if fine
Thanks
SPaReK
12-10-2002, 01:56 PM
Can you log into your server through telnet or ssh and issue the command:
uname -a
This will show you what your hostname is. Should be identical to the line you posted about from phpinfo().
sbhmike
12-10-2002, 02:06 PM
Hi
thats the problem my hostname is correct ? it`s just the php ? it`s driving me insane !
here is the result of uname -a
Linux sbh.myservername.com 2.4.19 #1 Mon Feb 25 09:15:47 EST 2002 i686 unknown
this is correct it`s just the php ?
thanks for the help
you need to set that host name in httpd.conf under ServerName and restart apache
sbhmike
12-10-2002, 02:59 PM
what is the path to that ?
i have already checked all the config files in user/local/apache/conf
including httpd.conf
the only reference i see to server name is
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
#ServerName sbh.myservername.com
it's not "server name"
you should put there ServerName sbh.myservername.com
DigitalIsles
12-10-2002, 03:03 PM
Actually, I believe when you compile php it takes the hostname and saves it. I don't believe that changing the hostname now will fix it, I think you will have to recompile php to fix it, but that is my guess. :blush:
Try to take out the #
however, this line should tell the actual name of your webserver, like www.cnn.com
You should probably fix your /etc/hosts file too.
sbhmike
12-10-2002, 03:16 PM
both httpd.conf & etc/hosts are correct ,server info in whm shows the correct information it`s only the php i have a problem with?
Actually, I believe when you compile php it takes the hostname and saves it.
Do you know where it saves it ?
thanks
DigitalIsles
12-10-2002, 03:22 PM
No, I'm not sure. I know I had to recompile it to get it to change. This was important to me because I didn't want my resellers customers to see our name. :cool:
matt2kjones
12-10-2002, 04:31 PM
Originally posted by DigitalIsles
Actually, I believe when you compile php it takes the hostname and saves it. I don't believe that changing the hostname now will fix it, I think you will have to recompile php to fix it, but that is my guess. :blush:
your 100% correct there
php takes the current hostname at the time of compile. if you change it after u have compiled php then u gotta recompile php
just the way it goes :P