SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast Jujubee's Avatar
    Join Date
    Mar 2001
    Location
    Canada
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange PHP error

    Started getting this error after my host copied everything over to a new server:

    Code:
    Warning: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/account/public_html/test2.php on line 77
    
    Warning: Failed opening 'http://domain.com/db/show.php?show=1&type=old' for inclusion (include_path='') in /home/account/public_html/test2.php on line 77
    Line 77 in the script is:

    PHP Code:
    <?php include("http://domain.com/db/show.php?show=1&type=old"); ?>
    Could this be due to a difference in the PHP module on the new machine? Help!

  2. #2
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Php is looking for a file called "show.php?show=1&type=old" When you want it to get the file "show.php" and pass the variables show=1 and type=old. on fix to your problem whould be...

    PHP Code:
    $show "1";
    $type "old";
    include(
    "show.php"); 
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  3. #3
    SitePoint Enthusiast Jujubee's Avatar
    Join Date
    Mar 2001
    Location
    Canada
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...the problem is that the code worked as is for 2 months. The error only started today after my host moved all accounts to a new machine (early this morning).


    That's a good tip though! Never thought of that simple solution.


    I'd still like to figure out what the above error is since I've got many includes and my site now looks like a mess.

  4. #4
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hrm... If they changed servers, or went to a different server, or reinstalled the server, they may have changed a setting or some configure in their build. A very good thing would be to bring this to their attention. This is because if they do this often they are not a very good server provider and need to be told that paying attention to server configures is extremely inportant when dealing with clients... You can always try webmaster@domainOfSite.com or something along those lines. Do not waste time with customer service... Ok.. I'm off my soap box. I feel better now...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  5. #5
    SitePoint Enthusiast Jujubee's Avatar
    Join Date
    Mar 2001
    Location
    Canada
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update:

    I tried this without any parameters

    <?php include("http://domain.com/db/show.php"); ?>


    Got the same error!

  6. #6
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then there is seriously something wrong with the way they have php set up.
    Love it? Hate it? Helpful? Useless?
    Use the rate button to let me know what you think of my post!

  7. #7
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try the same with a domain on the same server and it will probably work, if your host likes to save a few cents by running as a poxy... sorry proxy server, then you will not be able to include, or fopen remote files.

    You could try opening a socket connection but I would not hold out too much hope.

    If its an essential file, you can ask your host to cache the file locally for you, they will need to give you a new address to point to the file, anf this assumes they are in any way friendly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •