Page 1 of 1

getimagesize() warning

Posted: Mon Nov 03, 2003 1:44 pm
by kumarsena
hey,

i ahve a problem with a image gallaery script using getimagesze()

there are six pics in the folder. but only five warnings are printed.
also there is nothing wrong wth file permission, the fiels are all proper jpg and the path is correct as well, cause after the error mesages the pics are actually loaded. so it is confusing me alot, being a beginner ith php.

any help would be apreciated.
thanks
kumar



i have the following code

// loop through array and print each line

foreach ($data as $line)

{

// get image details

list($width, $height, $type, $attr) = getimagesize("thumb/$line");


echo "<td>";
echo "<img src=\"thumb/$line\" $attr >";
echo "</td>";
$row =$row + 1;

if ( $row == 4 ) {

echo "</tr> <tr>";
$row = 0;

}

}

this should in theory work, but im getting the following warning



Warning: getimagesize: Unable to open 'thumb/ash_n_guitar.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48

Warning: getimagesize: Unable to open 'thumb/brothers.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48

Warning: getimagesize: Unable to open 'thumb/buddies.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48

Warning: getimagesize: Unable to open 'thumb/clubbing_boys.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48


Warning: getimagesize: Unable to open 'thumb/clubbing_friends.jpg ' for reading. in /mnt/home2/k/ku/kumar/public_html/PHPphotoAlbum/index.php3 on line 48

Posted: Mon Nov 03, 2003 3:20 pm
by twigletmac
It can't open the files - it can't find them. If the relative path is correct, try setting the absolute path to see if that is any better.

Mac

Posted: Mon Nov 03, 2003 3:27 pm
by kumarsena
i have tried that as well now, still sme problem...this is drving me nuts..
can i email someone the whole code to look at, please..........?

thanks
kumar

Posted: Mon Nov 03, 2003 7:32 pm
by m3mn0n
[big_search]php gd getimagesize[/big_search]