Page 1 of 1

[function.getimagesize]: failed to open stream:

Posted: Tue Jul 07, 2009 5:41 am
by ravesmith
Hello,
I have taken a web hosting plan from inmotion.com and i have copied all files and folders on inmotion server. I can access my website, but when i access the webpages i get these errors:

Warning: getimagesize(/infob/pics/infob_image_2280_189.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/go2inb5/public_html/infob/readinfo.php on line 1062

Warning: Division by zero in /home/go2inb5/public_html/review/ratereview.php on line 816

pls tell me why its show these errors & provide me the solution for this

Re: [function.getimagesize]: failed to open stream:

Posted: Tue Jul 07, 2009 5:45 am
by onion2k
It's not finding the image "/infob/pics/infob_image_2280_189.jpg". The path is wrong. What the correct setting is depends on the directory structure of the web server.

Total guess: Try changing it to "./infob/pics/infob_image_2280_189.jpg".

Re: [function.getimagesize]: failed to open stream:

Posted: Tue Jul 07, 2009 5:57 am
by ravesmith
it displays the image but it does not resize the image and shows error on top of the page

Re: [function.getimagesize]: failed to open stream:

Posted: Tue Jul 07, 2009 6:35 am
by onion2k
That doesn't change anything. getimagesize() isn't finding the image on the path you've specified. The path is fine for the browser, but it's not fine for PHP. You need to fix it in the script. Ideally, make it relative to the path returned by getcwd().