Chris Green wrote:
I'm trying to get PHP5.02 and Apache2 working again having upgraded my slackware from 10 to 10.1. I've got Apache going OK but PHP is acting a bit odd.
The essential problem is that I've got my DNS a little bit awry (this may sound unrelated to PHP but we'll get there).
<snip>
However there are now some oddities occurring and I'm thinking I may have to change some/all of my hosts file. Firstly PHP keeps using the Linux server box's full name (server.isbd.co.uk) to try and do things and is failing miserably. Secondly for some reason the DNS on the LAN can't find home.isbd.net whereas everyone else in the world can find it and DNS on the LAN works for all other addresses.
In general what do others here do about naming machines on a small SoHo LAN behind a router? Is there some accepted way of doing it?
Firstly, check your /var/log/messages on your DNS box for "martian sources" - I get them as I've set my DNS up to resolve external and internal addresses and have set the ADSL router to forward on all ports to my gateway machine. If so, you may want to set up your system like I do (or you might try this anyway even if you're not getting those messages):-
1) Remove the entries in your hosts files (they're unwieldy to maintain and not necessary for an internal network) 2) Add aliases to <each server name>.isbd.co.uk to point to 192.168.1.x (or whatever) 3) Set the resolv.conf on all your machines to use your upstream's DNS server for querying (it will then query yours and get the internal network address) and set the search parameter to isbc.co.uk (to allow you to use the short name of each machine without the domain attached)
Matt