hi,
I have tried a number of different functions as well as getimagesize and seem to have the same problem. It just doesnt seem to be able to find the location of the file - but I can access the variable containing the address elsewhere in the code in order to display the picture without a problem. I am having exactly the same problem with the code below:
$src_img = imagecreatefromjpeg("/".$row_Recordset1['location']);
$origw=imagesx($src_img);
$origh=imagesy($src_img);
$new_w = $thumb_width;
$diff=$origw/$new_w;
$new_h=$new_w;
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
each time, no matter what I seem to try I get the error message:
Warning: imagecreatefromjpeg: Unable to open '/images/fullpictures/wedding/image2.jpg' for reading
I'm not sure but might it make a difference, as was suggestted earlier by superwormy, to enter the direct path for the server. The problem with this is that I'm not sure if using the http://www.webpage.com/pathtoroute/images/fullpictures....etc is the same and will work or do I really need to find out the /usr/local/www/path/to/file.jpg directory - and just how do I find out this directory?!?!
In response to the request for the code - I've tried it out in several different code sets and am having the same problem, so I know its not the code. I've ruled out quite a few problems - and concluded it must be something to do with the location.
thanks,
w.