1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

error using getimagesize() - php_network_getaddresses: getaddrinfo failed

Discussion in 'PHP' started by dtang4, Oct 7, 2006.

  1. #1
    Hey all,
    I recently changed servers. After the change, I started receiving the following error when callign the function getimagesize():

    I've set the permissions of the folder to 777. I'm guessing it has something to do w/ my PHP settings?

    Any help would be greatly appreciated. Thanks.
     
    dtang4, Oct 7, 2006 IP
  2. coolsaint

    coolsaint Banned

    Messages:
    257
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Dear Friend,

    This is a PHP Bug reported here.

    Check it.

    http://bugs.php.net/bug.php?id=11058

    I faced the same problem. I recompiled PHP. So if you do so i wish it should be gone.

    Thanks.

    Coolsaint
     
    coolsaint, Oct 7, 2006 IP
  3. dtang4

    dtang4 Active Member

    Messages:
    303
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hmm. I actually just upgraded to the latest version earlier today. In the bug thread, all the replies seem to date back to 2004 and refer to an older 4.x.x version of PHP.

    @coolsaint
    What version of PHP are you using?
     
    dtang4, Oct 7, 2006 IP
  4. Jpauls104

    Jpauls104 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Apparently it is having a problem resolving names... this could be a DNS/Firewall issue.

    Also try putting the relative image location vs. http://www|domain|com/image/9602.gif
     
    Jpauls104, Oct 8, 2006 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    I bet you can't include remote files either!

    I solved the problem by using the IP address instead of the URL:

    include('http://IPNUMBER/~user/page.php');

    Peace,
     
    Barti1987, Oct 8, 2006 IP
  6. dtang4

    dtang4 Active Member

    Messages:
    303
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #6
    The relative image location does work.

    Hmm, might be a DNS or firewall issue. If it's a firewall issue, how do I fix it? Is there a port that I need to open up?

    (I just got a server for the first time, so I have no idea how to do a lot of things.)
     
    dtang4, Oct 8, 2006 IP
  7. sudn3sc3d

    sudn3sc3d Active Member

    Messages:
    90
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    95
    #7
    What script are you using?
     
    sudn3sc3d, Oct 9, 2006 IP
  8. hadrick

    hadrick Banned

    Messages:
    117
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Coolsaint's answer is so correct. This is a bug from PHP found on 4.3 above. It get crapped because of this bug, so if you recompile php with apache again, it will be fixed. Remember to restart after the recompile done.

    Regards
     
    hadrick, Oct 9, 2006 IP
  9. leofire

    leofire Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I have had a similar problem with fedora core 16. This distro cannot create a ifcfg-eth0 under /etc/sysconfig/network-scripts.
    In my case I must to edit the /etc/resolv.conf in order to insert the nameserver (i'm using nameserver 8.8.8.8) but PHP seems to don't like it and make a lots of warning with getsiseimage function.

    If you create the ifcfg-eth0 file (or something else with your eth) with:
    DNS1=8.8.8.8

    then restart your machine and start the service
    systemctl start httpd.service

    everything works fine without recompile anything.
    In my case it works perfectly and the warning disappeared.

    Obviously allow_url_fopn myst be set to On into /etc/php.ini

    Have a good day,


    Leonardo
     
    leofire, May 16, 2012 IP