Hey its me again. i have an issue. i get the following error when i try to upload a pic. can someone help?

Warning: move_uploaded_file(/images/gallery/23be8201681ab5510ea9dc86e8c16293.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/portlao9/public_html/image-gallery/image-gallery/library/functions.php on line 21

// if a file is given
if (trim($image['tmp_name']) != '') {
$ext = substr(strrchr($image['name'], "."), 1);

// generate a random new file name to avoid name conflict
// then save the image under the new file name
$imagePath = md5(rand() * time()) . ".$ext";
$result = move_uploaded_file($image['tmp_name'], $uploadDir . $imagePath);