Hellow everyone...I am hoping someone can point me in the right direction. I will explain the problem I am having...please let me know if you have any ideas.
Problem:
Ok...I have an upload script that uploads photos into a file. The PATH to said photo is stored in MySql, not the photo itself.
Then I have a script that lets visitors look at the photos that have been uploaded by called to said photos path in the MySql DB.
I am using ImageMagick to change the dimensions of the photo on the fly so they are not to large for the page.
The problem I am having is this:
Photo_File/birdPhotos_a5.jpg
Warning: getimagesize(/Photo_File/birdPhotos_a5.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/content/xbbTT_098/html/Photo_File/the_photo.php on line 47
Does anyone know what would cause this? The path is correct. The files are there? Here is the code...maybe someone will see something I am not seeing.
$max_width = "350";
$convertBigPhoto = $thisPhotoView[fullSizePath];
// get the current info on the file
$current_size = getimagesize($convertBigPhoto);
$current_img_width = $current_size[0];
$current_img_height = $current_size[1];
$image_base = explode(".", $convertBigPhoto);
//testing
echo "$current_img_width";
// this part gets the new thumbnail name
$image_basename = $image_base[0];
$image_ext = $image_base[1];
$thumb_name = $image_basename."-mid.".$image_ext;
// determine if the image actually needs to be resized
// and if it does, get the new height for it
if ($current_img_width > $max_width) {
$too_big_diff_ratio = $current_img_width/$max_width;
$new_img_width = $max_width;
$new_img_height = round($current_img_height/$too_big_diff_ratio);
// presto chango alacazam
$make_magick = system("/usr/bin/convert -geometry $new_img_width x $new_img_height $convertBigPhoto $thumb_name", $retval);