Hello everyone, I built a small website with photo uploading application. It was working fine on my localhost. But when i put it on a free webhost (000webhost.com), it occurs PHP error: imagecreatefromjpeg(folder/1/2009/10/19/1256219713.jpg):failed to open stream: No such file or directory. I dont know what the problem is. Does anybody have any ideas? I googled for imagecreatefromjpeg() errors, some of them mentioned about installing GD. I dont know what GD is and I didnt use it at all, does that matter? Thanks for any help.
Verify the path of the image. This error means that there is no image where the function is trying to find it. GD is installed otherwise you would get a Fatal undefined function error.
Thanks for replying. You are right, I couldnt find the image in the folder where it is suppose to be. Ok, so the problem is the image wasnt uploaded to the correct place. I will be back again if i cant figure out why its not uploading to the correct place. Thank you.
Please help! I'm getting this error now. Warning:move_uploaded_file(folder/1/2009/10/19/1256233660.jpg):failed to open stream:No such file or directory. Warning:move_uploaded_file():Unable to move'/tmp/phpfWMa32' to folder/1/2009/10/19/1256233660.jpg.
yup, you're opening from a non-existing image, then moving another non-existing one... verify your full path for the upload
Use @mkdir(dirname($fullPathToFile),0777,true); PHP: when moving files and try using absolute file paths. Hint: define('ROOT',dirname(__FILE__)); PHP: