thanks for your reply.
all the permissions are set to 755, so i don't think that could be the problem.
I have been digging into this problem the last few hours and this is what i discovered :
appearantly the problem is that the 'readfile' function, doesn't have permission to read the pic that i want , 'open_basedir restriction in effect'
I've been looking on the php.net site and i found that the problem might be that the openbase directory is put to the wrong value (i've checked this for my ISP and its value is something with 'temp', so definitely not the directory where my pictures are)
So i think that's why it won't work 
The solution would be that i have all my pictures in the same directory as this php script, but unfortunately i can't do that.
So i wrote an email to my ISP to ask if and how i can adjust this php.ini file (because appearently it depends from ISP to ISP), so that i can change the openbase dir.
And then hope this solves my problem