PHP Thumb » Help & Bugs » Help

localhost error "function.getimagesize: failed to open stream"

(5 posts)
  1. banning
    Member

    I don't know why but on my current host I don't get an error when I use this script. AND on my old localhost here on my laptop I never got this error. But now that I got my new localhost and copied all my info over and what not I get this error and can't figure it out. I've tried to tweak the php.ini (memory_limit to be exact) file to get it to work

    Warning: getimagesize(http://localhost/path_to_image.../image.png) [function.getimagesize]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\path_to_php_thumb_resize\GdThumb.inc.php on line 1070

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\path_to_php_thumb_resize\GdThumb.inc.php on line 1070

    Anyway I realize you do this all for free and on your spare time so I REALLY appreciate any and all help you can give me :) thank you & thank you for this AMAZING script :)

    Posted 7 months ago #
  2. You tried using 127.0.0.1/path_to_image?

    Sometimes localhost doesn't resolve properly. Check your windows\system32\etc\hosts file, you could probably add a line in there for localhost so it resolves.

    Hope that helps, and thanks for the comments :)

    Posted 7 months ago #
  3. banning
    Member

    Is that a directory path? "windows\system32\etc\hosts" if so I don't see it. I use VertrigoServ to set up a quick test server on my laptops(that and it saves me the hassle of installing apache/mysql/php and it just does it all at once for me)... I'm just perplexed cause everything works fine on my other laptop

    Posted 7 months ago #
  4. Yeah it's a path to a file. I can't remember the EXACT path to it since I've been off windows for a long time, but it's definitely in the system32\something folder.

    We ran into something weird like this at my 9-5 where local sales demos of our product would act weird on some machines when using the localhost address, but worked just fine with the 127.0.0.1 address... no real explanation for it, it's just a windows thing I guess ;)

    Posted 7 months ago #
  5. banning
    Member

    Sorry im just now responding Ian but yes changing it from localhost to 127.0.0.1 made everything start working PERFECTLY!!! thank you so much :)

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.