Re: gethostbyname () uses old DNS server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/26/07, Richard Lynch <ceo@xxxxxxxxx> wrote:
On Mon, March 26, 2007 4:21 am, Kent Tong wrote:
> We have moved our DNS server from one IP to another. But on a Linux
> server, the PHP programs keep using the old DNS server IP. For
> example, for a simple php file:
>
> <? echo gethostbyname ("smtp.cpttm"); ?>
>
> When it is run, it tries to lookup smtp.cpttm using the old DNS
> server (I know it using tcpdump). The new DNS server is specified in
> /etc/resolv.conf. If I issue "ping smtp.cpttm" in a command prompt,
> then tcpdump shows that it is accessing the new DNS server.
>
> Any idea? Thanks.

Check /etc/hosts

Try doing the same thing from the command line.

And did you re-start apache so PHP could "forget" any DNS entries in
any cache it might have?  There may be something akin to
clearstatcache for DNS in PHP as well.

This problem is also solved already Richard...

Tijnema

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux