Forum Moderators: coopster

Message Too Old, No Replies

getimagesizw() problem,

could it be file persmission error?

         

kumarsena

5:07 pm on Nov 3, 2003 (gmt 0)

10+ Year Member



when using the getimagesize() fucntion im getting the following warning, but then it displays the images prperly at teh bottom...can someone tell me whtas going on? is it to do with file permisons on the server?

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 45

thanks
kumar

jatar_k

6:46 pm on Nov 3, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



maybe just chmod the directory to make it readable, and probably writable, by all.

kumarsena

6:57 pm on Nov 3, 2003 (gmt 0)

10+ Year Member



hi,

i ahve tried it all, now. made all apges writable, raqdble and excutable. but still the same problem. also im getting the error for the first 5 pics in the folder, while the last pic doesnt gve such an error. and as i sid, all pics re being loaded after the error meseges.

?

kumar

jatar_k

7:16 pm on Nov 3, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



[ca.php.net...]

If accessing the filename image is impossible, or if it isn't a valid picture, getimagesize() will return FALSE and generate a warning.

So it can't access the images

bad path
wrong permissions
not actually a jpg

Take a look at the user notes, search the page for "warning", it may help as well.

kumarsena

8:57 pm on Nov 3, 2003 (gmt 0)

10+ Year Member



really sorry guys,

i tried it all now, but the same problem still exists. the funny thing is the code can access the images. it is showing them, but only after issuing the warnings, which i find kinda weird. i dont know if im missing something...
if there is anyone outthere who are experts on the function getimagesize(), please help!

thanks alot guys...
kumar

jatar_k

9:49 pm on Nov 3, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Is it actually working? just giving a warning?

last resort, only if it's working.

turn down the error reporting for that page
[ca.php.net...]

kumarsena

11:58 pm on Nov 3, 2003 (gmt 0)

10+ Year Member



wow.

its working. well looking like tis working, thanks alot jatar_k. not what i was looking for, but still does the job. cheers.

kumar

kumarsena

12:12 am on Nov 4, 2003 (gmt 0)

10+ Year Member



actually it wasnt working.

the images were diplayed the normall way, without the image size being printed. since the images came up i tought it was working. basically i dont need to get the image sizxe, as they seem to display proper without. but still the problem reimains. the getimagesize() fiunstion cannot read the files, even toug the permissions are all set to read write and execute for all folder sub-olders and files...anyway, if anyone has any ideas let me know, otherwise i will post whatever answer i come up with if i do...

thanks for the help guys..

kumar