Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    12

    Default File_get_contents Couldn't resolve host name

    hello,

    I have a problem into a cpanel/whm plateform.

    Why i use file_get_contents with a domain, i got this error :
    Warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name
    In my php.ini, i have :
    Code:
    allow_url_fopen = On
    allow_url_include = On
    What is the problem with this fonction ?

    Ps : sorry for my english, i am french.

    Thanks a lot

  2. #2
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Question

    Hi,

    Does the /etc/hosts show the correct hostname & IPs?

  3. #3
    Member
    Join Date
    Aug 2008
    Posts
    12

    Default

    Hi,

    Thanks a lot ! /etc/hosts is the problem.

    he had two IP.

    Thanks

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    If you get that for anything else that is not in the /etc/hosts then check your resolver configuration.

  5. #5
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Thumbs up

    Quote Originally Posted by furtif View Post
    Hi,

    Thanks a lot ! /etc/hosts is the problem.

    he had two IP.

    Thanks
    You're welcome

Similar Threads & Tags
Similar threads

  1. main shared virtual host IP problem and Cant resolve domain name
    By raamee in forum cPanel and WHM Discussions
    Replies: 17
    Last Post: 03-20-2011, 01:24 AM
  2. sometimes sites resolve, other times get host not found
    By almecho in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-23-2007, 08:44 AM
  3. can't resolve host names
    By ramil in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-09-2006, 06:44 AM
  4. can not resolve host name
    By alicelik in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-06-2004, 06:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube