Jump to content

[SOLVED] failed to open stream: No such file or directory error...


Recommended Posts

Error: Warning: getimagesize(HighRollerz.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/thumpi5/public_html/crew.php on line 111

 

Here is the script:

if ($fileupload)
{
        $arr_allow_ex=array("gif","jpg","png");
	$uploadpath=$dir."/";
	$source=$_FILES[fileupload][tmp_name];
	$fileupload_name=$_FILES[fileupload][name];
	$weight=$_FILES[fileupload][size];

        $imagehw = GetImageSize($fileupload_name);
        $imagewidth = $imagehw[0];
        $imageheight = $imagehw[1];
        
        if (($crew["founder"] != $user["pimp"]) && ($crew["cofounder"] != $user["pimp"])) { $message='you are not the founder of this crew.'; }
    elseif ($imagewidth >= 33){$message="image width to big ($imagewidth pixels)";}
    elseif ($imageheight >= 33){$message="image height to big ($imageheight pixels)";}
    else{

	for($i=0;$i<count($arr_allow_ex);$i++)
	{
		if(getlast($fileupload_name)!=$arr_allow_ex[$i])
			$test.="~~";
	}
	$exp=explode("~~",$test);

            if(strstr($fileupload_name, " ")) {$message='you cannot have spaces in file name.';}
	elseif(count($exp)==(count($arr_allow_ex)+1)){$message='invalid image type.';}
	elseif($weight>$wei_fileupload){$message="File is to large (".$wei_fileupload." bytes)";}
        else{
            $fileupload_name="$fileupload_name$time";
	    $dest = ''; 
	    if ( ($source != 'none') && ($source != '' ))
	    {
	    $dest=$uploadpath.$fileupload_name;
	    if ($dest != '')
	    {
        if (copy($source,$dest))
		   {
               $exfile=explode(".",$fileupload_name);
		   $message="icon has been set successfully!";
               mysql_query("UPDATE `{$tab[crew]}` SET `icon`='$dir$fileupload_name' WHERE `name`='$crw' AND `rid`='$rid'");
		   }
            }
         }
      }
   }
}

Now, its uploading the file to the database. It worked fine in Php4 but now that its in php5, I'm getting this error, any ideas or help would be appreciated, thank you.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.